/* ============================================================
   PYQ Hub & Dashboard UI — Utility Styles
   Variables come from design-tokens.css (loaded globally)
   ============================================================ */

/* ---- Dashboard Wrapper ------------------------------------ */
.pyq-db-wrapper {
    background: #f3f4f6;
    padding-bottom: 60px;
}

/* ---- Dashboard Hero --------------------------------------- */
.pyq-db-hero {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 3rem 1rem;
    text-align: center;
}

.pyq-db-hero-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pyq-db-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.pyq-db-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* ---- Dashboard Content ------------------------------------ */
.pyq-db-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---- Section Title ---------------------------------------- */
.pt-sec-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    border-left: 4px solid var(--pt-green, #10b981);
    padding-left: 12px;
    margin: 3rem 0 1.25rem;
}

/* ---- Section Header row (title + view-all link) ----------- */
.pyq-db-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3.5rem 0 1.5rem;
}

.pyq-db-section-header .pt-sec-title {
    margin: 0;
}

.pyq-db-view-all {
    color: var(--pt-green, #10b981);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.pyq-db-view-all:hover {
    text-decoration: underline;
}

.pyq-db-empty {
    text-align: center;
    color: #94a3b8;
    padding: 3rem 1rem;
    font-size: 15px;
}

/* ---- Exam Cards ------------------------------------------- */
.pyq-exam-card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pyq-exam-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--pt-green, #10b981);
}

.pyq-exam-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: block;
}

.pyq-exam-card-count {
    font-size: 11px;
    color: #94a3b8;
    font-style: normal;
}

/* ---- Language Toggle (Archive Header) --------------------- */
.pyq-toggle-wrap {
    display: flex;
    background: #f1f5f9;
    padding: 0 !important; /* Removed 4px padding to eliminate gap */
    border-radius: 50px;
    width: fit-content;
    margin: 20px auto 0 auto;
    border: 1px solid #e2e8f0;
    overflow: hidden; /* Ensures inner buttons don't spill out */
}

.pyq-toggle-btn {
    padding: 8px 24px;
    border-radius: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    transition: 0.3s;
    line-height: 1;
}

.pyq-toggle-btn.pyq-active {
    background: white;
    color: var(--pt-green, #10b981);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ---- Search Box (Dashboard) ------------------------------ */
.pyq-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.pyq-search-input {
    width: 100%;
    padding: 14px 100px 14px 20px !important;
    border-radius: 50px !important;
    border: 2px solid #e2e8f0 !important;
    font-size: 16px !important;
    outline: none;
}

.pyq-search-input:focus {
    border-color: var(--pt-green, #10b981) !important;
}

.pyq-search-submit {
    position: absolute;
    right: 6px;
    background: var(--pt-green, #10b981);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ---- Exam Grid (Dashboard) ------------------------------- */
.pyq-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* ---- Topic Pills (Dashboard) ----------------------------- */
.topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-pill {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    text-decoration: none !important;
    transition: 0.2s;
}

.topic-pill:hover {
    border-color: var(--pt-green, #10b981);
    color: var(--pt-green, #10b981);
}

/* ---- Lang Switch Pill (shared — single post + archive) --- */
.pt-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0 !important;
    background: #f1f5f9;
    border: 1.5px solid var(--pt-border, #e2e8f0) !important;
    border-radius: 50px;
    padding: 3px !important;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

#ptLangToggle, #ptArchiveLangToggle {
    padding: 0 !important;
    gap: 0 !important;
}

.pt-lang-opt {
    width: 36px !important;
    height: 36px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease;
}

.pt-lang-switch.is-en .opt-en,
.pt-lang-switch.is-hi .opt-hi {
    background: var(--pt-primary, #10b981);
    color: #fff;
}

.pt-lang-switch.is-en .opt-hi,
.pt-lang-switch.is-hi .opt-en {
    background: transparent;
    color: #64748b;
}

/* ---- Tool Button (shared — single post + archive) -------- */
.pyq-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    height: 28px;
}

.pyq-tool-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--pt-primary);
}

.pyq-tool-btn svg {
    color: #64748b;
    width: 13px;
    height: 13px;
}

.pyq-tool-btn:hover svg {
    color: var(--pt-primary);
}

/* ---- Utility -------------------------------------------- */
.hidden {
    display: none !important;
}