/**
 * AI Waisaka Search Styles
 * Styling for AI-powered search toggle and loading overlay
 */

/* AI Search Toggle Container */
/* OFF State: White icon on brown gradient background */
.ai-search-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #388E3C 0%, #1B5E20 100%);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(78, 52, 46, 0.3);
}

.ai-search-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 52, 46, 0.4);
}

/* ON State: (Waisaka Theme) */
.ai-search-toggle.active {
    background: linear-gradient(75deg, #181006 0%, #181006 50%, #3e1e08 60%, #351801 100%);
}

/* OFF State: White icon */
.ai-search-toggle .ai-icon {
    font-size: 18px;
    color: #ffffff;
    transition: color 0.3s ease;
}

/* ON State: Dark Brown icon */
.ai-search-toggle.active .ai-icon {
    background: #ffffff;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    font-size: 18px;
}

.ai-search-toggle .ai-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ai-search-toggle .toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    background: linear-gradient(75deg, #181006 0%, #181006 50%, #3e1e08 60%, #351801 100%) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ai-search-toggle .toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ai-search-toggle.active .toggle-switch {
    background: linear-gradient(135deg, #388E3C 0%, #1B5E20 100%) !important;
    border-radius: 12px;
}

.ai-search-toggle.active .toggle-switch::after {
    left: 24px;
}

/* AI Loading Overlay */
.ai-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ai-loading-content {
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-loading-content .ai-brain-icon {
    font-size: 60px;
    color: #3e1e08;
    margin: 0 auto 20px;
    width: 100px;
    height: 100px;
    background: rgba(62, 30, 8, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.ai-loading-content h4 {
    color: #333333;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 20px;
}

.ai-loading-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.ai-loading-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.ai-loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.ai-loading-step .step-icon {
    font-size: 16px;
}

.ai-loading-step.active {
    background: linear-gradient(135deg, #efebe9 0%, #d7ccc8 100%);
    color: #3e1e08;
    font-weight: 600;
}

.ai-loading-step.active .step-icon {
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* AI Search Badge */
.ai-search-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #3e1e08 0%, #5d4037 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 10px;
}

.ai-search-badge i {
    color: #ffd54f;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-search-toggle {
        padding: 6px 12px;
    }

    .ai-search-toggle .ai-label {
        font-size: 11px;
    }

    .ai-search-toggle .toggle-switch {
        width: 36px;
        height: 18px;
    }

    .ai-search-toggle .toggle-switch::after {
        width: 14px;
        height: 14px;
    }

    .ai-search-toggle.active .toggle-switch::after {
        left: 20px;
    }

    .ai-loading-content {
        margin: 20px;
        padding: 30px;
    }

    .ai-loading-content .ai-brain-icon {
        font-size: 48px;
    }
}