/* ============================================= */
/* styles.css - Extracted inline styles          */
/* ============================================= */

/* ======================== */
/* PWA Install Popup        */
/* ======================== */
#pwa-install-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: #000000;
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100000;
    max-width: 90%;
    width: 340px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: none;
}

#pwa-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.pwa-popup-body {
    text-align: center;
}

.pwa-popup-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px auto;
    border-radius: 16px;
    display: block;
}

.pwa-popup-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Inter', sans-serif;
}

.pwa-popup-desc {
    color: #cccccc;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

#pwa-install-btn {
    width: 100%;
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

/* ======================== */
/* Auto Welcome Popup       */
/* ======================== */
#auto-welcome-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.welcome-popup-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

.welcome-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.welcome-popup-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-popup-heading {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 12px 0;
    font-family: 'Playfair Display', serif;
}

.welcome-popup-text {
    font-size: 15px;
    color: #666666;
    margin: 0 0 24px 0;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, sans-serif;
}

#auto-popup-install-btn {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
}

#auto-popup-close-btn {
    width: 100%;
    background: transparent;
    color: #666666;
    border: 1px solid #e5e5e5;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

/* ======================== */
/* Page Loader              */
/* ======================== */
#page-loader {
    display: none !important;
}

/* ======================== */
/* Logo & Hero Section      */
/* ======================== */
#logoLink {
    color: #000000;
}

.hero-bg-image {
    /* background-image removed: <img fetchpriority="high"> in HTML already
       handles the hero image. CSS background caused a late 2nd request
       (2,370 ms LCP delay) and pointed to a different file path. */
}

.hero-title-color {
    color: #000000;
}

.hero-subtitle-shadow {
    text-shadow: 0 0 1px rgba(0,0,0,0.2);
}

/* ======================== */
/* Thinkly AI Section       */
/* ======================== */
.thinkly-section-padding {
    padding-top: 3rem;
}

.cursor-pointer-style {
    cursor: pointer;
}

.hidden-file-input {
    display: none;
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    width: 100%;
    gap: 8px;
}

.textarea-flex-grow {
    flex-grow: 1;
}

.svg-full {
    width: 100%;
    height: 100%;
}

#closeButton {
    cursor: pointer;
    z-index: 2147483665;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#closeButton svg {
    pointer-events: none;
}

#expandedQuickPills {
    display: flex;
    margin: 16px;
    margin-top: 12px;
    margin-bottom: 12px;
}

#expandedImageChipsContainer {
    display: none;
    padding-bottom: 8px;
}

.expanded-input-area-inner {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

#expandedFileButton {
    position: relative;
}

#expandedAttachmentDropdown {
    position: absolute;
    bottom: 60px;
    left: 0;
    z-index: 2147483650;
}

.action-buttons-relative {
    position: relative;
}

/* ======================== */
/* Study Material Section   */
/* ======================== */
.study-material-cards-hidden {
    display: none;
}

/* ======================== */
/* Leaderboard              */
/* ======================== */
.profile-loader-inline {
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
}

/* ======================== */
/* AcademyX Section         */
/* ======================== */
.academyx-hero-bg {
    /* Optimized: WebP + 800px width + q60 → ~25KB vs ~419KB original */
    background-image: url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=800&q=60&fm=webp');
}

.animate-delay-01 {
    animation-delay: 0.1s;
}

.animate-delay-015 {
    animation-delay: 0.15s;
}

.animate-delay-02 {
    animation-delay: 0.2s;
}

.animate-delay-03 {
    animation-delay: 0.3s;
}

.marquee-force-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

.map-image-bg {
    /* Optimized: WebP + 800px width + q60 → ~20KB vs ~230KB original */
    background-image: url('https://images.unsplash.com/photo-1569336415962-a4bd9f69cd83?auto=format&fit=crop&w=800&q=60&fm=webp');
}

.scan-animation {
    animation-duration: 4s;
}

/* ======================== */
/* Footer NEX Link          */
/* ======================== */
.nex-font-style {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: -1px;
}

/* ======================== */
/* Success Modal            */
/* ======================== */
#successTitle {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #1f2937;
}

#successProductName {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #6b7280;
    font-weight: 600;
}

#successMessage {
    margin-bottom: 32px;
    color: #6b7280;
    line-height: 1.6;
}

#successContinueBtn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ======================== */
/* Search Area              */
/* ======================== */
.relative-z10 {
    position: relative;
    z-index: 10;
    opacity: 1;
}

.search-input-dir {
    direction: ltr;
    text-align: left;
    unicode-bidi: bidi-override;
}

/* ======================== */
/* Mobile Bottom Nav        */
/* ======================== */
#mobile-nav nav {
    pointer-events: auto;
}

.mobile-nav-no-highlight {
    -webkit-tap-highlight-color: transparent;
}

#nex-button-mobile {
    display: flex;
    position: relative;
    z-index: 20;
    border: none;
    cursor: pointer;
}

#mobileThinklyBtn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ======================== */
/* AI Settings              */
/* ======================== */
#ai-model-select {
    position: relative;
    z-index: 2147483647;
}

/* ======================== */
/* Accessibility: Green text contrast fix (WCAG AA)  */
/* text-green-600 = #16a34a (3.2:1) → green-700 = #15803d (4.55:1) */
/* ======================== */
.text-green-600 {
    color: #15803d !important;
}

/* ======================== */
/* Fullscreen Image Modal   */
/* ======================== */
#fullScreenImageModal {
    pointer-events: auto;
}

#downloadFullImage {
    border: none;
    cursor: pointer;
}

/* ======================== */
/* Exit Confirm Modal       */
/* ======================== */
#exitConfirmModal {
    animation: fadeIn 0.25s ease-out;
}

#exitConfirmModal > div {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ======================== */
/* PDF Overlay System       */
/* ======================== */
#pdfOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 99999;
}

#pdfCloseBtn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 100000;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

#pdfCloseBtn:hover,
#pdfCloseBtn:active {
    background: #f1f1f1;
    transform: scale(1.08);
}

#pdfFrame {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ======================== */
/* EMO Pet SVG              */
/* ======================== */
.emo-screen svg {
    width: 100%;
    height: 100%;
}

/* ========================================== */
/* � GOD MODE: AI CHAT VISIBILITY FIX 🚨 */
/* ========================================== */

/* 1. Modal ko Screen par Fixed karo (Niche chupne se roko) */
#expandedView {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f9fafb !important;
    z-index: 2147483640 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 2. Chat messages scroll honge, par input box nahi hilega */
#expandedChatOutput {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    width: 100% !important;
    padding-bottom: 10px !important;
}

/* 2b. Header ko apna stacking context do (sidebar z-99999 ke neeche) */
.expanded-header {
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0;
}

/* 3. Input Area ko zabardasti Bottom par chipkao */
.expanded-input-area {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    padding: 12px 16px max(16px, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #e5e7eb !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08) !important;
    z-index: 50 !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* View More containers ke neeche extra space nahi chahiye */
#view-more-container-nexbook,
#view-more-container-nexbook-donors {
    margin-bottom: 0 !important;
}

/* 4. Input Box ka Inner Design (Gray Background) */
.input-area.expanded-input-area-inner {
    display: flex !important;
    align-items: flex-end !important;
    gap: 12px !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 24px !important;
    padding: 8px 16px !important;
    min-height: 52px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 5. Textarea ki styling */
.textarea-wrapper.textarea-flex-grow {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
}

textarea#expandedSearchInput, .ITIRGe {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #111827 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    resize: none !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    max-height: 120px !important;
    display: block !important;
    vertical-align: top !important;
    text-align: left !important;
}

/* 6. Buttons ka alignment */
.action-buttons-relative {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-bottom: 2px !important;
}

/* 7. Send Button (Perfect Round Blue) */
button#expandedSendButton, .OEueve {
    background-color: #000 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

button#expandedSendButton.disabled, .OEueve.disabled {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
}

.emo-send-face .svg-full {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}
/* ========================================== */

/* ========================================== */
/* 📊 CHATGPT-STYLE TABLE (HORIZONTAL SCROLL) */
/* ========================================== */
.ai-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.ai-table-scroll table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 14px;
}

.ai-table-scroll th,
.ai-table-scroll td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
}

.ai-table-scroll thead tr {
    background: #f9fafb;
}

.ai-table-scroll thead th {
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 1;
}

.ai-table-scroll tbody tr:nth-child(even) {
    background: #fafafa;
}

.ai-table-scroll tbody tr:hover {
    background: #f0f9ff;
}
/* ========================================== */
