/* ==========================================================================
   EXAM365DAYS UNIVERSAL APP-LIKE MOBILE LOCK STYLESHEET
   Fixes: Android Font Boosting, Display Zoom Issues & Broken Word Wrapping
   ========================================================================== */

/* 1. GLOBAL RESET & FONT-INFLATION LOCK */
*, *::before, *::after {
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent; /* Click par blue/grey box hataye */
}

html {
    /* Android Chrome aur iOS me font ko zabardasti bada hone se rokein */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    
    /* Double tap zoom delay hataye (App speed feeling) */
    touch-action: manipulation;
    
    /* Smooth Scroll */
    scroll-behavior: smooth;
    
    /* Horizontal scrollbar block */
    overflow-x: hidden;
    width: 100%;
}

body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Side scroll ko permanently block karein */
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* 2. TYPOGRAPHY & WORD PROTECTION (Hindi + English) */
h1, h2, h3, h4, h5, h6, p, span, a, label, li, td, th, div {
    /* Hindi matra aur lambe English words ko bich se tootne se rokein */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal !important;
    -webkit-hyphens: manual;
    hyphens: manual;
}

/* Form input focus par iOS/Android par screen zoom-in na ho */
input, select, textarea, button {
    font-size: 14px; /* Minimum standard size */
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    touch-action: manipulation;
}

/* 3. FLUID IMAGES & MEDIA PROTECTION */
img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* 4. FLEXBOX & GRID ITEM OVERFLOW FIX */
/* Flex ke andar text aane par box bahar na bhage */
.row, .d-flex, [class*="col-"] {
    min-width: 0;
}

.flex-grow-1, .flex-shrink-0 {
    min-width: 0;
}

/* 5. UNIVERSAL CARD & BOX BEHAVIOR (Height Collapsing Fix) */
.card, 
.quiz-card, 
.ca-mini-card, 
.ca-feed-card, 
.ca-news-digest-card, 
.option-item {
    height: auto !important; /* Fixed height ke bajaye auto flex use karein */
    min-height: auto;
    max-width: 100%;
}

/* 6. APP-STYLE CLEAN TEXT CLAMPING (1-Line & 2-Line Ellipsis) */
/* Agar 1 line me text cut karna ho */
.text-truncate, 
.text-truncate-1 {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block;
}

/* Agar 2 line me text cut karna ho (Android App Card Style) */
.text-truncate-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
    max-height: calc(1.35em * 2);
}

/* Agar 3 line me text cut karna ho */
.text-truncate-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
}

/* 7. FAST SCROLL PALETTE & CAROUSEL ON MOBILE */
.palette-wrapper, 
.ca-slider-track, 
.month-pills-scroll, 
.category-slider-scroll {
    -webkit-overflow-scrolling: touch !important; /* iOS smooth inertia scroll */
    scrollbar-width: none !important;           /* Firefox */
}
.palette-wrapper::-webkit-scrollbar, 
.ca-slider-track::-webkit-scrollbar, 
.month-pills-scroll::-webkit-scrollbar, 
.category-slider-scroll::-webkit-scrollbar {
    display: none !important;                   /* Chrome/Safari */
}
/* =======================================================
   APP-STYLE RIGID COMPONENT FIXES (SCREENSHOT SPECIFIC)
======================================================= */

/* 1. FIX SCREENSHOT 1: META TAGS & STATS BAR (Eng / हिंदी & 80 Qs) */
.meta-tag-item, 
.badge-meta,
[class*="meta-"] {
    white-space: nowrap !important; /* "Eng / हिंदी" ko 1 line me rakhega */
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-size: 11.5px !important;
}

/* 3-Column Stats Grid (Questions, Marks, Time) */
.mock-stat-box, 
.card-stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 4px !important;
    padding: 8px 6px !important;
    text-align: center;
}
.mock-stat-box span, 
.mock-stat-box small {
    white-space: nowrap !important;
    font-size: 10.5px !important;
}
.mock-stat-box strong, 
.mock-stat-box b {
    white-space: nowrap !important;
    font-size: 13px !important;
}

/* 2. FIX SCREENSHOT 2: TOPIC SET ROW & BUTTONS (Adverbs - Set 01) */
.topic-set-row,
.sub-test-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 10px 12px !important;
}

.topic-set-info {
    flex: 1 1 auto !important;
    min-width: 0 !important; /* Text truncate support */
}

.topic-set-info h6,
.topic-set-info .title {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-set-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.topic-set-actions .btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
}

/* 3. FIX SCREENSHOT 3: TABLE BREAKDOWN (Squeezed & Cut Text) */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.pattern-breakdown-table,
.table-bordered {
    width: 100% !important;
    min-width: 320px;
    table-layout: auto !important;
    margin-bottom: 0 !important;
}

.pattern-breakdown-table th,
.pattern-breakdown-table td {
    padding: 8px 6px !important;
    font-size: 11.5px !important;
    vertical-align: middle !important;
    text-align: center;
}

/* Section name column ko zyada space dein */
.pattern-breakdown-table th:first-child,
.pattern-breakdown-table td:first-child {
    text-align: left !important;
    font-weight: 700;
    max-width: 140px;
}

/* Badges inside tables */
.pattern-breakdown-table .badge,
.pattern-breakdown-table button {
    white-space: nowrap !important;
    font-size: 9.5px !important;
    padding: 3px 6px !important;
}

/* 4. FIX SCREENSHOT 4: CBT PORTAL HEADER & SUBJECT TABS */
.cbt-header-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 12px !important;
    gap: 6px !important;
}

.cbt-timer-badge {
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
}

/* Subject Tabs Horizontal Scroll */
.cbt-subject-tabs {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    padding: 4px 2px !important;
}
.cbt-subject-tabs::-webkit-scrollbar {
    display: none !important;
}
.cbt-subject-tabs .nav-link,
.cbt-subject-tabs .tab-btn {
    white-space: nowrap !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    flex-shrink: 0 !important;
}

/* Question Palette Numbers (1, 2, 3...) */
.cbt-palette-stream {
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
    padding: 6px 2px !important;
    scrollbar-width: none !important;
}
.cbt-palette-stream::-webkit-scrollbar {
    display: none !important;
}
.cbt-palette-stream .q-btn {
    min-width: 32px !important;
    height: 32px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
}