﻿/* Custom Multi-Select Component CSS - Bootstrap form-select benzeri */

/* Ana container stilleri */
.custom-multi-select {
    position: relative;
}

    /* Varsayılan display - Bootstrap form-select class'ını kullan */
    .custom-multi-select .custom-select-display {
        cursor: pointer;
        display: flex;
        align-items: center;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

        .custom-multi-select .custom-select-display:hover {
            border-color: #86b7fe;
        }

        .custom-multi-select .custom-select-display:focus {
            outline: none;
            border-color: #86b7fe;
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        }

    /* İçerik stilleri - sadece custom-multi-select içinde geçerli */
    .custom-multi-select .placeholder-text {
        color: #6c757d; /* Bootstrap muted color */
    }

    .custom-multi-select .selected-item {
        color: #212529; /* Bootstrap text color */
        font-weight: 500;
    }

    .custom-multi-select .more-count {
        background-color: #e9ecef;
        color: #6c757d;
        padding: 0.125rem 0.375rem;
        border-radius: 0.25rem;
        font-size: 0.75em; /* Relative to parent font size */
        margin-left: 0.25rem;
        white-space: nowrap;
    }

/* Selection Modal stilleri - sadece modal içinde geçerli */
.selection-modal .modal-dialog {
    max-width: 600px;
}

.selection-modal .modal-title {
    font-size: 1rem;
    line-height: 1.4;
}

.selection-modal .table-responsive {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.selection-modal .table th {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.selection-modal .table td {
    font-size: 0.875rem;
    padding: 0.5rem;
    border-color: #dee2e6;
    vertical-align: middle;
}

.selection-modal .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Badge stilleri - sadece modal içinde */
.selection-modal .badge-light-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.selection-modal .badge-light-secondary {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Buton stilleri - sadece modal içinde */
.selection-modal .btn-light-primary {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    transition: all 0.15s ease-in-out;
}

    .selection-modal .btn-light-primary:hover {
        background-color: rgba(13, 110, 253, 0.2);
        border-color: rgba(13, 110, 253, 0.3);
        color: #0d6efd;
    }

/* Checkbox stilleri - sadece modal içinde */
.selection-modal .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.selection-modal .form-check-input:indeterminate {
    background-color: #6c757d;
    border-color: #6c757d;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

.selection-modal .form-check-input {
    transition: all 0.15s ease-in-out;
}

    .selection-modal .form-check-input:focus {
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        border-color: #86b7fe;
    }

/* Disabled durumu */
.custom-multi-select.disabled .custom-select-display {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* Error durumu - Bootstrap is-invalid benzeri */
.custom-multi-select.is-invalid .custom-select-display {
    border-color: #dc3545;
}

    .custom-multi-select.is-invalid .custom-select-display:focus {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    }

/* Success durumu - Bootstrap is-valid benzeri */
.custom-multi-select.is-valid .custom-select-display {
    border-color: #198754;
}

    .custom-multi-select.is-valid .custom-select-display:focus {
        border-color: #198754;
        box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    }

/* Loading overlay */
.overlay-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 0.375rem;
}

/* Responsive düzenlemeler */
@media (max-width: 768px) {
    .selection-modal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }

    .custom-multi-select .more-count {
        display: block;
        margin: 0.25rem 0 0 0;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-modal .modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* İçerik stilleri - sadece custom-multi-select içinde geçerli */
.custom-multi-select .placeholder-text {
    color: #6c757d; /* Bootstrap muted color */
}

.custom-multi-select .selected-item {
    color: #212529; /* Bootstrap text color */
    font-weight: 500;
}

.custom-multi-select .more-count {
    background-color: #e9ecef;
    color: #6c757d;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75em; /* Relative to parent font size */
    margin-left: 0.25rem;
    white-space: nowrap;
}

/* Selection Modal stilleri - sadece modal içinde geçerli */
.selection-modal .modal-dialog {
    max-width: 600px;
}

.selection-modal .modal-title {
    font-size: 1rem;
    line-height: 1.4;
}

.selection-modal .table-responsive {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.selection-modal .table th {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.selection-modal .table td {
    font-size: 0.875rem;
    padding: 0.5rem;
    border-color: #dee2e6;
    vertical-align: middle;
}

.selection-modal .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Badge stilleri - sadece modal içinde */
.selection-modal .badge-light-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.selection-modal .badge-light-secondary {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Buton stilleri - sadece modal içinde */
.selection-modal .btn-light-primary {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    transition: all 0.15s ease-in-out;
}

    .selection-modal .btn-light-primary:hover {
        background-color: rgba(13, 110, 253, 0.2);
        border-color: rgba(13, 110, 253, 0.3);
        color: #0d6efd;
    }

.selection-modal .btn-light-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    transition: all 0.15s ease-in-out;
}

    .selection-modal .btn-light-danger:hover {
        background-color: rgba(220, 53, 69, 0.2);
        border-color: rgba(220, 53, 69, 0.3);
        color: #dc3545;
    }

/* Checkbox stilleri - sadece modal içinde */
.selection-modal .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.selection-modal .form-check-input:indeterminate {
    background-color: #6c757d;
    border-color: #6c757d;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

.selection-modal .form-check-input {
    transition: all 0.15s ease-in-out;
}

    .selection-modal .form-check-input:focus {
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        border-color: #86b7fe;
    }

/* Disabled durumu */
.custom-multi-select.disabled .custom-select-display {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

    .custom-multi-select.disabled .custom-select-display:hover {
        border-color: #ced4da;
    }

/* Error durumu - Bootstrap is-invalid benzeri */
.custom-multi-select.is-invalid .custom-select-display,
.custom-multi-select.has-error .custom-select-display {
    border-color: #dc3545;
}

    .custom-multi-select.is-invalid .custom-select-display:focus,
    .custom-multi-select.has-error .custom-select-display:focus {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    }

/* Success durumu - Bootstrap is-valid benzeri */
.custom-multi-select.is-valid .custom-select-display,
.custom-multi-select.has-success .custom-select-display {
    border-color: #198754;
}

    .custom-multi-select.is-valid .custom-select-display:focus,
    .custom-multi-select.has-success .custom-select-display:focus {
        border-color: #198754;
        box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    }

/* Loading overlay */
.overlay-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 0.375rem;
}

/* Responsive düzenlemeler */
@media (max-width: 768px) {
    .selection-modal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }

    .selection-modal-content .row.g-2 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    .selection-modal-content .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .custom-multi-select .more-count {
        display: block;
        margin: 0.25rem 0 0 0;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-modal .modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* Scroll bar stilleri - sadece modal içinde */
.selection-modal .table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.selection-modal .table-responsive::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.selection-modal .table-responsive::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

    .selection-modal .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #adb5bd;
    }
