/* ============================================================
   PYQ Archive Page Styles
   ============================================================ */

/* Page Variables mapped via pyq-design-tokens.css */

/* ---- Page Layout ------------------------------------------ */
.pt-archive-wrapper {
    background-color: var(--pt-bg);
    padding-bottom: 60px;
    font-family: inherit;
}

.pt-archive-header {
    background: transparent;
    border-bottom: none;
    padding: 2.5rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.pt-archive-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--pt-dark);
    margin: 0 0 0.5rem 0;
    text-transform: capitalize;
}

.pt-archive-desc {
    font-size: 14px;
    color: var(--pt-gray);
    max-width: 750px;
    margin: 0 auto 1rem auto;
    line-height: 1.6;
}

.pt-archive-header .pt-lang-switch {
    margin-top: 12px;
}

.pt-archive-grid {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}

.pt-list-container {
    background: var(--pt-bg-card, #ffffff);
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--pt-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

/* ---- Archive List (pyq-related-list used inside archive) --- */

/* Give the list a card feel in archive context */
.pt-list-container .pyq-related-list {
    background: var(--pt-bg-card, #ffffff);
}

/* Archive items use column body (badges + text + footer) */
.pt-list-container .pyq-related-list li.pyq-related-item {
    align-items: flex-start !important;
    padding: 14px 20px !important;
}

/* Body row — badges (removed), text, QID */
.pyq-related-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Removed pyq-related-badges CSS as per user request */

/* Footer wrapper removed in PHP, QID now pushed by margin-left: auto in pyq-related-meta */

/* Removed badge styles as per user request */

/* ---- Lang Visibility — archive uses data-pyq-lang on wrapper */
/* Works with pt-show-en / pt-show-hi spans in list items */
[data-pyq-lang="hi"] .pt-show-en { display: none !important; }
[data-pyq-lang="en"] .pt-show-hi { display: none !important; }

/* Ensure pyq-related-label respects archive lang toggle */
[data-pyq-lang="hi"] .pyq-related-label.pt-show-hi {
    display: -webkit-box !important;
}

/* ---- Pagination ------------------------------------------- */
.pt-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.pt-pagination .page-numbers {
    padding: 8px 16px;
    background: var(--pt-bg-card, #ffffff);
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 8px;
    color: var(--pt-text, #334155);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.pt-pagination .current {
    background: var(--pt-green);
    color: var(--pt-white, #ffffff);
    border-color: var(--pt-green);
}

/* ---- Empty State ------------------------------------------ */
.pt-archive-empty {
    text-align: center;
    padding: 5rem 1rem;
}

.pt-archive-empty p {
    color: var(--pt-text-muted, #94a3b8);
    font-size: 16px;
    margin-bottom: 1rem;
}

.pt-archive-empty a {
    color: var(--pt-green);
    font-weight: 700;
    text-decoration: none;
}

/* ---- Shortcode "See all" button --------------------------- */
.pyq-shortcode-more {
    text-align: center;
    margin-top: 20px;
}

.pyq-shortcode-more-link {
    display: inline-block;
    background: #059669;
    color: var(--pt-white, #ffffff);
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.pyq-shortcode-more-link:hover {
    background: #047857;
    color: var(--pt-white, #ffffff);
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 640px) {
    .pt-archive-title { font-size: 20px; }
    .pt-list-container { border-radius: 8px; }
    .pt-list-container .pyq-related-list li.pyq-related-item {
        padding: 12px 14px !important;
    }
    .pyq-related-foot .pyq-related-meta { display: none; }
}

/* Phase 1 (HIGH priority) — small-phone mobile fixes */
@media (max-width: 480px) {
    .pt-archive-header { padding: 1.5rem 0.75rem; margin-bottom: 1.25rem; }
    .pt-archive-title { font-size: 18px; }
    .pt-archive-desc { font-size: 13px; }
    .pt-archive-grid { padding: 0 8px; }
    .pt-pagination { gap: 6px; margin-top: 2rem; }
    .pt-pagination .page-numbers {
        min-width: 44px;
        min-height: 44px;
        padding: 10px 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        box-sizing: border-box;
    }
    .pyq-shortcode-more-link {
        min-height: 44px;
        padding: 12px 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .pt-archive-title { font-size: 17px; }
    .pt-archive-desc { font-size: 12px; }
    .pt-pagination .page-numbers { padding: 10px 12px; font-size: 12px; }
}
