/* ==========================================
   ApnaNaam.in — Main Stylesheet
   Extracted from inline <style> in index.html
   ========================================== */

/* === Base === */
* { scroll-behavior: smooth; }
body { font-feature-settings: "liga" 1, "calt" 1; }

/* === Accordion === */
.accordion-item input[type="checkbox"] + label { cursor: pointer; }
.accordion-item input[type="checkbox"] + label + .accordion-content {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out;
}
.accordion-item input[type="checkbox"]:checked + label + .accordion-content { max-height: 500px; }
.accordion-item input[type="checkbox"] { display: none; }
/* Round bottom corners off when FAQ item is open */
.accordion-item input[type="checkbox"]:checked + label {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}
/* Rotate chevron when open */
.accordion-item input[type="checkbox"] + label svg { transition: transform 0.3s ease; }
.accordion-item input[type="checkbox"]:checked + label svg { transform: rotate(180deg); }

/* === Gradient Text === */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Card Hover === */
.card-hover { transition: all 0.3s ease; }
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

/* === IDN Badge === */
.idn-badge {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
}

/* === Search Results === */
.result-card { transition: all 0.3s ease; }
.result-card:hover { background: #f8f5ff; }

/* === Loading Spinner === */
.spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid #fff; border-top-color: transparent;
    border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Slide Animation === */
.slide-enter { animation: slideDown 0.3s ease-out; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Modal Overlay === */
.modal-overlay {
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}

/* === Language Selector === */
.lang-selector {
    position: relative;
}
.lang-selector-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; margin: 6px 8px 6px 0;
    cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
    background: #334155; border: 1px solid #475569;
    border-radius: 8px; min-width: auto;
}
.lang-selector-btn:hover { background: #475569; border-color: #64748b; }

.lang-dropdown {
    position: absolute; top: calc(100% + 4px); right: 0;
    background: #1e293b; border: 1px solid #334155;
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    width: 320px; max-height: 400px; overflow-y: auto;
    z-index: 100; display: none;
}
.lang-dropdown.show { display: block; }

.lang-dropdown-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; cursor: pointer; transition: background 0.15s;
    border-bottom: 1px solid #334155; color: #e2e8f0;
}
.lang-dropdown-item:last-child { border-bottom: none; }
.lang-dropdown-item:hover { background: #312e81; }
.lang-dropdown-item.active { background: #3b0764; }
.lang-dropdown-item .text-gray-900 { color: #f1f5f9; }
.lang-dropdown-item .text-gray-400 { color: #94a3b8; }
.lang-dropdown-item .text-gray-500 { color: #94a3b8; }

.lang-dropdown-search {
    position: sticky; top: 0; background: #1e293b;
    padding: 12px; border-bottom: 1px solid #334155;
}
.lang-dropdown-search input {
    width: 100%; padding: 8px 12px; border: 1px solid #475569;
    border-radius: 8px; font-size: 13px; outline: none;
    background: #0f172a; color: #e2e8f0;
}
.lang-dropdown-search input::placeholder { color: #64748b; }
.lang-dropdown-search input:focus {
    border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

.script-tag {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    background: #f3f0ff; color: #7c3aed; font-weight: 600;
}

/* === Header Language Selector === */
#headerLangSelector .lang-selector-btn {
    margin: 0;
}
#headerLangSelector .lang-dropdown {
    z-index: 9999;
}

/* === Filter Chips === */
.filter-section { margin-top: 16px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border-radius: 20px; font-size: 13px;
    font-weight: 500; cursor: pointer; transition: all 0.2s;
    border: 1px solid #e5e7eb; background: #fff; color: #4b5563;
    user-select: none; white-space: nowrap;
}
.filter-chip:hover { border-color: #a78bfa; color: #7c3aed; background: #f5f3ff; }
.filter-chip.active {
    background: linear-gradient(135deg, #8b5cf6, #0ea5e9);
    color: #fff; border-color: transparent;
}
.filter-chip .chip-icon { font-size: 12px; }

.filter-group-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #9ca3af; margin-bottom: 0;
}

/* === Filter Accordion === */
.filter-accordion input[type="checkbox"] { display: none; }
.filter-accordion label { cursor: pointer; }
.filter-accordion label .chevron-icon {
    transition: transform 0.3s ease; display: inline-block;
}
.filter-accordion input[type="checkbox"]:checked + label .chevron-icon {
    transform: rotate(180deg);
}
.filter-accordion .filter-accordion-body {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out;
}
.filter-accordion input[type="checkbox"]:checked + label + .filter-accordion-body {
    max-height: 600px;
}

/* === Cart Page === */
.cart-item-card { transition: all 0.3s ease; }
.cart-item-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

/* Sticky Checkout Bar */
.sticky-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 12px 0;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

body.has-sticky-bar {
    padding-bottom: 72px;
}

.order-summary { transition: all 0.3s ease; }

.empty-cart { animation: fadeIn 0.6s ease-in; }

.cart-search input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

/* === Toast Notification === */
.toast-notification {
    animation: slideDown 0.3s ease-out;
}
