/* assets/css/style.css */

/* =========================================
   1. GLOBAL RESETS & TYPOGRAPHY
   ========================================= */
:root {
    /* Brand Colors Synced with Header */
    --brand-gold: #E5B822; 
    --brand-red: #D92128;
    --brand-red-light: #fca5a5;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-50: #f8fafc;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans Myanmar', sans-serif;
    background-color: var(--slate-50);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile body */
    color: var(--slate-900);
}

/* Fluid Typography: Scales smoothly between 320px and 1200px viewports */
h1 { font-size: clamp(1.75rem, 5vw, 3.75rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 4vw, 3rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 3vw, 2.25rem); line-height: 1.3; }

/* =========================================
   2. DYNAMIC UI & RESPONSIVE UTILITIES
   ========================================= */
.text-gradient-gold {
    background: linear-gradient(to right, var(--brand-gold), #FCD34D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-red {
    background: linear-gradient(to right, var(--brand-red), #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-pattern {
    background-color: var(--slate-900);
    background-image: radial-gradient(var(--brand-gold) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* Dynamic Glassmorphism Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

/* Focus Rings for Inputs - Dynamic Branding */
.focus-ring-gold:focus {
    box-shadow: 0 0 0 3px rgba(229, 184, 34, 0.2);
    border-color: var(--brand-gold);
    outline: none;
}

.focus-ring-red:focus {
    box-shadow: 0 0 0 3px rgba(217, 33, 40, 0.2);
    border-color: var(--brand-red);
    outline: none;
}

/* =========================================
   3. CUSTOM SCROLLBARS (ALL DEVICES)
   ========================================= */
/* Main browser scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--slate-50);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-gold);
}

/* Horizontal scrolling tables & filters */
.overflow-x-auto::-webkit-scrollbar {
    height: 4px;
}
@media (min-width: 768px) {
    .overflow-x-auto::-webkit-scrollbar {
        height: 6px;
    }
}

/* =========================================
   4. MODAL & DRAWER HANDLING
   ========================================= */
/* Ensure modals scroll on small mobile screens (landscape etc) */
[x-show="showCreate"], [x-show="showEdit"], [x-show="showModal"] {
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}

/* Constrain modal height on mobile to allow scrolling inside */
@media (max-height: 800px) {
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* =========================================
   5. GOOGLE TRANSLATE CUSTOMIZATION
   ========================================= */
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }

/* Keep specific widget hidden as we use custom UI, but format fallback just in case */
.goog-te-gadget-simple {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(229, 184, 34, 0.3) !important;
    padding: 8px 12px !important;
    border-radius: 9999px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    transition: all 0.3s ease;
}

/* =========================================
   6. PRINT STYLES (INVOICES)
   ========================================= */
@media print {
    @page { margin: 0; }
    body { 
        background-color: white !important; 
        color: black !important; 
        padding: 20px;
    }
    nav, footer, .no-print, button, a[href^="javascript"] { display: none !important; }
    .shadow-xl, .shadow-2xl, .shadow-lg { box-shadow: none !important; border: none !important; }
    .bg-slate-50, .bg-white { background-color: white !important; }
    .text-slate-400 { color: #64748b !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .print-container { width: 100% !important; margin: 0 !important; padding: 0 !important; }
}