/* ==========================================================================
   OnlineCBT - Test Series Portal Styles (Sidebar + Beautiful Card Grid)
   ========================================================================== */

:root {
    --ts-blue: #0066cc;
    --ts-navy: #0e2947;
    --ts-accent: #0056b3;
    --ts-green: #16a34a;
    --ts-line: #e2e8f0;
    --ts-muted: #64748b;
    --ts-cream: #f8fafc;
}

body, html {
    height: auto;
    margin: 0;
    background-color: #f8fafc;
}

/* Master Wrapper */
.test-series-master {
    display: flex;
    padding-top: 30px;
    padding-bottom: 60px;
    min-height: calc(100vh - 80px);
    max-width: 1360px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    gap: 30px;
}

/* --------------------------------------------------------------------------
   Desktop Left Sidebar (Course Categories)
   -------------------------------------------------------------------------- */
.ts-sidebar-panel {
    width: 270px;
    background: #ffffff;
    border: 1px solid var(--ts-line);
    border-radius: 12px;
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    flex-shrink: 0;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ts-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 18px 14px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ts-navy);
    border-bottom: 1px solid var(--ts-line);
    margin-bottom: 8px;
}

.ts-sidebar-header i {
    color: var(--ts-blue);
    font-size: 1rem;
}

.ts-sidebar-menu .nav-link {
    font-size: 0.88rem;
    color: var(--ts-muted);
    padding: 10px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    margin: 3px 12px;
    border-radius: 8px;
    text-decoration: none;
}

.ts-sidebar-menu .nav-link i {
    margin-right: 12px;
    font-size: 0.95rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--ts-cream);
    color: var(--ts-blue);
    transition: 0.2s;
    flex-shrink: 0;
}

.ts-sidebar-menu .nav-link:hover {
    background-color: #f1f5f9;
    color: var(--ts-navy);
}

.ts-sidebar-menu .nav-item.active .nav-link {
    background-color: #eff6ff;
    color: var(--ts-blue);
    font-weight: 700;
}

.ts-sidebar-menu .nav-item.active .nav-link i {
    background-color: var(--ts-blue);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Mobile Category Selector (Dropdown)
   -------------------------------------------------------------------------- */
.ts-mobile-category-selector {
    display: none;
    margin-bottom: 20px;
}

.ts-mobile-category-selector select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--ts-line);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ts-navy);
    background-color: #ffffff;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* --------------------------------------------------------------------------
   Main Content Area & Search
   -------------------------------------------------------------------------- */
.ts-content-main {
    flex-grow: 1;
    min-width: 0;
}

.ts-search-box {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--ts-line);
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.ts-search-box i {
    font-size: 1rem;
    color: var(--ts-muted);
}

.ts-search-box input {
    border: none;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    margin-left: 12px;
    color: var(--ts-navy);
    background: transparent;
}

.ts-search-box:focus-within {
    border-color: var(--ts-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

/* --------------------------------------------------------------------------
   Exam Card Styling (Matches User Uploaded Screenshot)
   -------------------------------------------------------------------------- */
.ts-exam-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}

.ts-exam-card:hover {
    transform: translateY(-4px);
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.12);
}

/* Share Button (Top Right) */
.ts-share-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    padding: 0;
}

.ts-share-btn:hover {
    background: #f1f5f9;
    color: var(--ts-blue);
    transform: scale(1.06);
}

/* Card Top Graphic Banner */
.ts-card-banner {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 12px;
    margin: 12px 12px 14px 12px;
    height: 140px;
    border: 1px solid #f1f5f9;
}

.ts-card-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ts-banner-overlay {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    position: relative;
    z-index: 1;
}

.ts-banner-watermark {
    position: absolute;
    right: 14px;
    bottom: 8px;
    font-size: 46px;
    opacity: 0.16;
    color: #ffffff;
    pointer-events: none;
}

.ts-title-pill {
    background: linear-gradient(135deg, #0b1f3a 0%, #0434c6 100%);
    color: #ffffff;
    padding: 7px 18px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(4, 52, 198, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card Body */
.ts-card-body {
    padding: 0 18px 18px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Blue Accent Bar + Course Title */
.ts-exam-title-bar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.ts-accent-bar {
    width: 4px;
    height: 18px;
    background: #0056b3;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.ts-exam-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #004085;
    margin: 0;
    line-height: 1.3;
}

.ts-exam-title a {
    color: #004085;
    text-decoration: none;
    transition: color 0.15s;
}

.ts-exam-title a:hover {
    color: #002752;
}

/* Meta Line */
.ts-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.ts-till-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #334155;
    font-weight: 700;
}

.ts-till-date i {
    color: #dc2626;
    font-size: 0.95rem;
}

.ts-practice-sets {
    color: #334155;
    font-weight: 700;
}

/* Features Checklist (Green Circles with White Checkmark) */
.ts-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
}

.ts-feature-list li {
    font-size: 0.82rem;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    font-weight: 600;
    line-height: 1.4;
    gap: 8px;
}

.ts-feature-list li i {
    color: var(--ts-green);
    font-size: 0.95rem;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Price Section */
.ts-price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-bottom: 15px;
}

.ts-price-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.95rem;
}

.ts-price-new {
    color: #0077cc;
    font-size: 1.65rem;
    font-weight: 850;
    letter-spacing: -0.5px;
    line-height: 1;
}

.ts-disc-badge {
    background: var(--ts-green);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Bottom Buttons Row */
.ts-buttons-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ts-btn-buy {
    background: #0066cc;
    border: none;
    color: #ffffff !important;
    padding: 0 16px;
    height: 42px;
    border-radius: 24px !important;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none !important;
    transition: 0.25s ease;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.25);
    flex: 1;
}

.ts-btn-buy:hover {
    background: #004c99;
    box-shadow: 0 6px 14px rgba(0, 102, 204, 0.38);
    transform: translateY(-1px);
}

.ts-btn-google-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    text-decoration: none !important;
    transition: 0.25s ease;
    flex-shrink: 0;
    background: transparent;
    padding: 0;
    border: none;
}

.ts-btn-google-play:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.ts-btn-google-play img {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

/* Empty State */
.ts-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--ts-line);
}

.ts-empty-state i {
    font-size: 40px;
    color: var(--ts-muted);
    margin-bottom: 14px;
}

.ts-empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ts-navy);
    margin-bottom: 6px;
}

.ts-empty-state p {
    font-size: 0.9rem;
    color: var(--ts-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .ts-sidebar-panel {
        display: none;
    }
    .ts-mobile-category-selector {
        display: block;
    }
    .test-series-master {
        padding-top: 15px;
        flex-direction: column;
        padding-left: 15px;
        padding-right: 15px;
    }
    .ts-search-box {
        margin-bottom: 18px;
    }
}
