/* Search Config Manager Styles */

.search-config-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.search-config-trigger:hover {
    color: var(--primary);
    background-color: var(--neutral-100);
    transform: scale(1.05);
}

.search-config-trigger.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.search-config-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Modal Styles */
.search-config-modal .modal-dialog {
    max-width: 800px;
}

.search-config-modal .modal-header {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: white;
    border-bottom: none;
}

.search-config-modal .modal-header .btn-close {
    filter: invert(1);
}

.search-config-modal .modal-header .modal-title {
    color: white;
    font-weight: 600;
}

.search-config-modal .modal-body {
    padding: 2rem;
    background: white;
}

/* Instruction Text */
.instruction-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.instruction-text p {
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Search Options Section */
.search-options-section {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.search-options-section .form-check {
    margin-bottom: 0;
}

.search-options-section .form-check-label {
    color: #374151;
    font-size: 0.875rem;
}

.search-options-section .form-check-label strong {
    color: #1f2937;
    font-weight: 600;
}

.search-options-section .form-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-options-section .form-check-label {
    margin-left: 0.5rem;
}

.search-options-section .form-check-input:checked {
    background-color: #3182ce;
    border-color: #3182ce;
}

/* Sections */
.config-section {
    margin-bottom: 2rem;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e2e8f0;
}

.config-section-title iconify-icon {
    font-size: 1.2rem;
    color: #3182ce;
}

/* Items List */
.config-items-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem;
    background: white;
    columns: 2;
    column-gap: 1rem;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

.config-item:last-child {
    border-bottom: none;
}

.config-item:hover {
    background-color: #f8fafc;
    border-color: #e5e7eb;
}

.config-item-info {
    flex: 1;
}

.config-item-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.config-item-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.config-item-toggle {
    margin-left: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s ease;
    border-radius: 26px;
    border: 2px solid #e2e8f0;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-slider:hover {
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

input:checked + .toggle-slider {
    background-color: #3182ce;
    border-color: #3182ce;
}

input:checked + .toggle-slider:hover {
    background-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

input:focus + .toggle-slider {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}



/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state iconify-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--neutral-300);
}

/* Loading State */
.config-loading {
    text-align: center;
    padding: 2rem;
}

.config-loading .spinner-border {
    color: var(--primary);
}

/* Buttons */
.search-config-modal .btn-group {
    gap: 0.5rem;
}

.btn-reset-config {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
    font-weight: 500;
}

.btn-reset-config:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.search-config-modal .btn-primary {
    background: #3182ce;
    border-color: #3182ce;
    font-weight: 500;
}

.search-config-modal .btn-primary:hover {
    background: #2c5aa0;
    border-color: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.search-config-modal .btn-secondary {
    background: #6b7280;
    border-color: #6b7280;
    color: white;
    font-weight: 500;
}

.search-config-modal .btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .search-config-modal .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
    
    .config-items-list {
        columns: 1;
    }
    
    .config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .config-item-toggle {
        margin-left: 0;
        align-self: flex-end;
    }
}

/* Animation pour l'icône */
@keyframes configPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.search-config-trigger.pulse {
    animation: configPulse 0.3s ease-in-out;
}
