/* Header Components CSS - Custom Select, Multi-select, Consent Section */

/* Custom Select Container */
.custom-select-container {
    position: relative;
}

/* Multi-select styles */
.custom-multiselect-container {
    position: relative;
}

.selected-departments {
    min-height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    background: white;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    transition: border-color 0.3s ease;
}

.selected-departments:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.selected-departments-placeholder {
    color: #999;
    font-size: 14px;
    padding: 4px 8px;
}

.selected-department-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeInScale 0.3s ease;
    max-width: 200px;
}

.selected-department-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-department {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-department:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-select-wrapper {
    position: relative;
}

.custom-select-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.custom-select-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select-arrow.open {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.custom-select-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.custom-select-option:hover {
    background-color: #f8f9fa;
}

.custom-select-option.selected {
    background-color: #667eea;
    color: white;
}

.custom-select-option.hidden {
    display: none;
}

.custom-select-no-results {
    padding: 12px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.custom-select-search-highlight {
    background-color: #fff3cd;
    font-weight: bold;
}

/* Sözleşme ve Onay Alanı Stilleri */
.consent-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.consent-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.consent-header:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
}

.consent-title {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.consent-arrow {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.consent-arrow.rotated {
    transform: rotate(180deg);
}

.consent-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.consent-content.open {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.consent-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.consent-item:last-child {
    border-bottom: none;
}

.required-consent {
    background: #fff;
}

.consent-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
    gap: 12px;
}

.consent-checkbox-label input[type="checkbox"] {
    display: none;
}

.consent-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dc3545;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-checkmark.optional {
    border-color: #6c757d;
}

.consent-checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.consent-checkbox-label input[type="checkbox"]:checked + .consent-checkmark {
    background: #dc3545;
    border-color: #dc3545;
}

.consent-checkbox-label input[type="checkbox"]:checked + .consent-checkmark.optional {
    background: #28a745;
    border-color: #28a745;
}

.consent-checkbox-label input[type="checkbox"]:checked + .consent-checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.consent-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.communication-consent {
    background: #f8f9fa;
    padding: 20px;
    margin-top: 10px;
    border-radius: 6px;
}

.communication-title {
    color: #dc3545;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
}

.communication-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.optional-consent {
    padding: 10px 0;
    border-bottom: none;
    background: transparent;
}

.optional-consent .consent-text {
    font-weight: 500;
    color: #495057;
}

/* Mobil Responsive */
@media (max-width: 768px) {
    .consent-header {
        padding: 12px 15px;
    }
    
    .consent-title {
        font-size: 15px;
    }
    
    .consent-item {
        padding: 12px 15px;
    }
    
    .consent-text {
        font-size: 13px;
    }
    
    .communication-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .communication-consent {
        padding: 15px;
    }
    
    .selected-departments {
        min-height: 40px;
        padding: 6px;
    }
    
    .selected-department-tag {
        font-size: 12px;
        padding: 4px 8px;
        max-width: 150px;
    }
}

/* Max selection alert animation */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}