/*
Theme Name: IPO Premium Exact App Theme (Separated News & 3-Color Line)
Theme URI: https://funfire.in
Author: Savaliya Janak
Description: 100% Exact App Design with Top Live IPO Ticker Line (3 Colors), OPEN/UPCOMING/CLOSED Tabs, and Completely Separated Blog Articles Section.
Version: 4.0.0
License: GNU General Public License v2 or later
Text Domain: ipo-app-exact-theme
*/

:root {
    --bg-app: #f6f7fb;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --green-accent: #16a34a;
    --orange-accent: #d97706;
    --red-accent: #dc2626;
    --blue-bar: #2563eb;
    --dark-btn: #334155;
    --radius-card: 14px;
}

* {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.4;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.app-screen-container {
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.06);
    position: relative;
    padding-bottom: 70px;
}

/* Header Bar */
.app-top-header {
    background: #ffffff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.burger-menu-btn {
    font-size: 20px;
    color: #334155;
    background: none;
    border: none;
    cursor: pointer;
}

.live-subscription-badge {
    background: #fee2e2;
    color: #ef4444;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.live-subscription-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: blinker 1.5s linear infinite;
}
@keyframes blinker { 50% { opacity: 0; } }

.header-action-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 18px;
}

/* Tabs */
.app-status-tabs-row {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
}

.app-tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}
.tab-open { color: var(--green-accent); }
.tab-upcoming { color: var(--orange-accent); }
.tab-closed { color: var(--red-accent); }

.app-tab-item.tab-open.active { border-bottom: 3px solid var(--green-accent); background: #f0fdf4; }
.app-tab-item.tab-upcoming.active { border-bottom: 3px solid var(--orange-accent); background: #fffbeb; }
.app-tab-item.tab-closed.active { border-bottom: 3px solid var(--red-accent); background: #fef2f2; }

/* Sub-filter */
.app-subfilter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 4px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.app-check-group { display: flex; gap: 14px; }
.app-check-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.app-sort-action { color: var(--text-muted); cursor: pointer; }
.filter-by-label { text-align: center; font-size: 12px; color: #94a3b8; margin-bottom: 10px; }

/* HIGHLIGHTED OPEN IPO RUNNING TICKER LINE */
.open-ipo-ticker-line {
    background: #0f172a;
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin: 0 10px 12px 10px;
    border-radius: 8px;
    overflow: hidden;
}
.ticker-prefix {
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-right: 8px;
}
.ticker-scroll-window {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}
.ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.ticker-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 12px;
    font-weight: 600;
}

/* 3-COLOR SYSTEM */
.gmp-high { background: #ecfdf5 !important; color: #15803d !important; border: 1px solid #86efac !important; }
.gmp-med { background: #fffbeb !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.gmp-low { background: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; }

/* Panels */
.tab-panel-container { padding: 0 10px; }
.tab-panel-content { display: none; }
.tab-panel-content.active { display: block; }

/* Card Component */
.app-card-wrapper {
    background: #ffffff;
    border-radius: var(--radius-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    overflow: hidden;
}
.card-title-header { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; }
.card-title-header h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.card-body-section { padding: 14px 16px; }

.card-top-grid { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.card-logo-container { width: 80px; height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.card-logo-container img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-top-rows { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.card-data-row { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.c-label { color: var(--text-muted); font-weight: 500; }
.c-val { font-weight: 700; color: var(--text-primary); }

.card-gmp-highlight-block {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.card-gmp-flex { display: flex; justify-content: space-between; align-items: center; }
.gmp-rumors-title { font-size: 14px; font-weight: 700; }
.gmp-rumors-value { font-size: 16px; font-weight: 800; }
.last-heard-row { display: flex; justify-content: space-between; font-size: 12px; margin-top: 3px; }
.profit-bold { font-weight: 800; color: var(--text-primary); }
.disclaimer-text { font-size: 11px; color: #94a3b8; margin-top: 8px; }

.card-actions-grid {
    display: grid;
    grid-template-columns: 1fr 48px 1fr;
    gap: 8px;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}
.btn-card-view {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 0;
    border-radius: 6px;
    text-align: center;
}
.btn-card-share {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.btn-card-apply {
    background: var(--dark-btn);
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 0;
    border-radius: 6px;
    text-align: center;
}

.card-bottom-strip {
    background: var(--blue-bar);
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 0;
}
.card-bottom-strip.sme { background: #9333ea; }

/* ========================================================
   SEPARATED NEWS & ARTICLES SECTION AT BOTTOM
   ======================================================== */
.blog-articles-section {
    margin-top: 24px;
    padding: 16px 12px;
    background: #f8fafc;
    border-top: 2px solid var(--border-light);
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title-bar h2 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.view-all-link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--blue-bar);
}

.article-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-article-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.15s ease;
}

.news-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.news-thumb-box {
    width: 85px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.news-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content-box {
    flex-grow: 1;
}

.news-date {
    font-size: 11px;
    color: #94a3b8;
    display: block;
    margin-bottom: 4px;
}

.news-content-box h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}

.news-content-box h4 a {
    color: #0f172a;
}

.news-content-box p {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Bottom Nav */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
}

.app-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.app-nav-item.active { color: #eab308; }
.app-nav-item span { font-size: 16px; }

.nav-center-circle {
    width: 50px;
    height: 50px;
    background: #0284c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    margin-top: -24px;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
    border: 4px solid #ffffff;
}

.empty-state {
    background: #ffffff;
    padding: 30px 16px;
    text-align: center;
    border-radius: var(--radius-card);
    color: #94a3b8;
    font-size: 13.5px;
    border: 1px dashed #cbd5e1;
    margin: 10px 0;
}
