/* ==========================================================================
   DubaiTools - Premium Luxury Design System
   Emerald & Gold accents, Glassmorphism, Micro-animations & Print Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* UAE Luxury Palette */
    --color-emerald-50: #ecfdf5;
    --color-emerald-500: #10b981;
    --color-emerald-600: #059669;
    --color-emerald-700: #047857;
    --color-emerald-900: #064e3b;
    
    --color-gold-400: #fbbf24;
    --color-gold-500: #f59e0b;
    --color-gold-600: #d97706;
    
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(226, 232, 240, 0.8);
    --glass-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.dark {
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(51, 65, 85, 0.6);
    --glass-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
}

body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Glassmorphism Cards */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card-hover {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -8px rgba(5, 150, 105, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.05);
    border-color: rgba(16, 185, 129, 0.4);
}

/* Luxury Gradient Text */
.text-gradient-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pulse Badge */
.pulse-badge {
    position: relative;
}

.pulse-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* AI Floating Button Glow */
.ai-glow-btn {
    position: relative;
    overflow: hidden;
}

.ai-glow-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 60%);
    animation: rotateGlow 8s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Dynamic Receipt Animation */
.receipt-line {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Optimization */
@media print {
    header, footer, #aiAdvisorDrawer, #aiFloatingToggle, .no-print {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .print-only {
        display: block !important;
    }
    .glass-panel {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }
}

/* Calculation Animations */
.calc-result-reveal {
    animation: calcReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes calcReveal {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 25px 5px rgba(16, 185, 129, 0.25);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: var(--glass-shadow);
    }
}

/* Shimmer bar for calculation in progress */
.calc-shimmer {
    position: relative;
    overflow: hidden;
}
.calc-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Number ticker bounce on instant recalculation */
.calc-number-pulse {
    animation: numberPulse 0.35s ease-out;
}
@keyframes numberPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); color: #10b981; }
    100% { transform: scale(1); }
}

/* Modal Spin & Pop Animation for Lead Capture */
.modal-spin-in {
    animation: modalSpinIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSpinIn {
    0% {
        opacity: 0;
        transform: scale(0.65) rotate(-6deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}
