/* ═══════════════════════════════════════════════════════════════
   _articles_widget.php
   ═══════════════════════════════════════════════════════════════ */
.tv-articles-widget {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
    margin-top: 1rem;
}
.tv-aw-head {
    background: var(--tv-aw-accent);
    color: #fff;
    padding: 11px 16px;
    font-weight: 700;
    font-size: .92em;
}
.tv-aw-body { padding: 6px 0; }
.tv-aw-empty {
    margin: 0;
    padding: 16px;
    color: var(--bs-secondary-color, #6b7280);
    font-size: .88em;
    text-align: center;
}
.tv-aw-list li {
    border-bottom: 1px dashed var(--bs-border-color, #e4e7ed);
}
.tv-aw-list li:last-child { border-bottom: none; }
.tv-aw-link {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--bs-body-color);
    font-size: .9em; line-height: 1.5;
    transition: background-color .15s, color .15s;
}
.tv-aw-link:hover {
    background: var(--bs-tertiary-bg, #f5f6f8);
    color: var(--tv-aw-accent);
}
.tv-aw-bullet {
    flex-shrink: 0;
    color: var(--tv-aw-accent);
    font-weight: 800;
}
.tv-aw-title {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-aw-more {
    text-align: center;
    padding: 8px 14px 12px;
}
.tv-aw-more a {
    color: var(--tv-aw-accent);
    font-size: .85em; font-weight: 700;
    text-decoration: none;
}
.tv-aw-more a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   _calendar_widget.php
   ═══════════════════════════════════════════════════════════════ */
/* === Calendar grid (mirrors original taghvim look) === */
.tv-cal-grid {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
}

/* Month header */
.tv-cal-month-head {
    background: var(--tv-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
}
.tv-cal-title {
    font-size: 1.18em;
    font-weight: 700;
    color: #fff;
    flex: 1;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.tv-cal-title span { font-weight: 700; opacity: .9; }

/* Month/year pickers in header — RTL-safe dropdown caret on the trailing
   edge (left side in RTL). Uses logical padding so the caret never sits
   under the text. */
.tv-month-pick, .tv-year-pick {
    background: transparent; color: #fff; border: 0;
    font-family: inherit; font-size: 1em; font-weight: 700;
    cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none;
    padding-block: 4px;
    padding-inline-start: 6px;
    padding-inline-end: 22px;
    line-height: 1.2;
    background-image:
        linear-gradient(45deg,  transparent 50%, rgba(255,255,255,.85) 50%),
        linear-gradient(135deg, rgba(255,255,255,.85) 50%, transparent 50%);
    background-position: 12px center, 7px center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.tv-month-pick:focus, .tv-year-pick:focus {
    background-color: rgba(255,255,255,.10);
    border-radius: 6px;
}
.tv-month-pick option, .tv-year-pick option {
    color: var(--bs-body-color, #1a1d23);
    background: var(--bs-body-bg, #fff);
}

/* Jump-to-month bar */
.tv-goto-bar {
    background: var(--bs-body-bg, #fff);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--bs-border-color, #e2e5ea);
    border-top: 0;
    padding: 10px 14px;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    margin-top: -6px;
    margin-bottom: 14px;
}
.tv-goto-bar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.tv-goto-bar input, .tv-goto-bar select {
    padding: 6px 10px; border: 1px solid var(--bs-border-color, #e2e5ea);
    border-radius: 6px; font-family: inherit; font-size: .88em;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    outline: none;
}
.tv-goto-bar input { width: 82px; text-align: center; }
.tv-goto-bar button {
    padding: 6px 14px; background: var(--tv-accent); color: #fff;
    border: none; border-radius: 6px; font-family: inherit;
    font-size: .88em; cursor: pointer; font-weight: 700;
}
.tv-goto-bar button:hover { opacity: .85; }
.tv-pill-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 8px;
    background: rgba(22, 163, 74, .12); color: var(--tv-accent);
    text-decoration: none; font-size: .8em; font-weight: 700;
    margin-right: auto;
}
.tv-pill-link:hover { background: var(--tv-accent); color: #fff; }
.tv-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    transition: .15s;
}
.tv-nav-link:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Weekday header row */
.tv-grid-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bs-body-bg, #fff);
    padding: 12px 10px 6px;
}
.tv-grid-head span {
    text-align: center;
    font-size: .82em;
    font-weight: 700;
    color: var(--bs-secondary-color, #6b7280);
    letter-spacing: .3px;
}
.tv-grid-head span:last-child { color: #c2410c; opacity: .9; }

/* Cells grid */
.tv-grid-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 8px 10px 12px;
}
.tv-cell {
    background: var(--bs-tertiary-bg, #f5f6f8);
    border-radius: 9px;
    min-height: 76px;
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: .15s;
}
.tv-cell:hover {
    background: var(--bs-secondary-bg, #e9edf3);
    transform: translateY(-1px);
    color: inherit;
}
.tv-cell.empty {
    background: transparent;
    pointer-events: none;
    box-shadow: none;
}
.tv-cell.holiday { background: #fce7d3; }
.tv-cell.holiday .tv-day-num { color: #c2410c; }
.tv-cell.today {
    background: var(--tv-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
}
.tv-cell.today .tv-day-num { color: #fff; }
.tv-cell.today .tv-day-sub { color: rgba(255,255,255,.92) !important; }

.tv-day-num {
    font-size: 2em;
    font-weight: 700;
    line-height: 1;
}
.tv-day-sub {
    position: absolute;
    font-size: .75em;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}
.tv-day-sub.tl { top: 6px; left: 8px; }
.tv-day-sub.br { bottom: 6px; right: 8px; }
.tv-day-sub.greg  { color: #1d4ed8; }
.tv-day-sub.hijri { color: #7c3aed; }

/* Footer */
.tv-cal-footer {
    padding: 12px 16px 14px;
    background: var(--bs-body-bg, #fff);
    border-top: 1px solid var(--bs-border-color, #e2e5ea);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tv-ft-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: .88em;
    font-weight: 700;
}
.tv-ft-line.greg  { color: #1d4ed8; }
.tv-ft-line.hijri { color: #7c3aed; }
.tv-ft-bar {
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: .25;
    max-width: 70px;
}

/* Month-events list (sidebar) */
.tv-month-events-list {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
}
.tv-mel-head {
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    font-size: .9em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tv-mel-body {
    list-style: none;
    margin: 0;
    padding: 8px 14px 12px;
}
.tv-mel-body li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--bs-border-color, #e2e5ea);
}
.tv-mel-body li:last-child { border-bottom: none; }
.tv-mel-link {
    display: flex;
    gap: 8px;
    text-decoration: none;
    color: var(--bs-body-color);
    font-size: .85em;
    line-height: 1.5;
    transition: color .15s;
}
.tv-mel-link:hover { color: var(--tv-accent); }
.tv-mel-day {
    flex-shrink: 0;
    color: var(--bs-secondary-color, #6b7280);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 38px;
}
.tv-mel-title { flex: 1; }
.tv-mel-more {
    color: var(--tv-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: .85em;
}

/* Dark mode */
[data-bs-theme="dark"] .tv-cell { background: #1f242b; }
[data-bs-theme="dark"] .tv-cell:hover { background: #2a3038; }
[data-bs-theme="dark"] .tv-cell.holiday { background: #3a2418; }

/* Responsive: shrink cells on narrow widths */
@media (max-width: 520px) {
    .tv-cell { min-height: 56px; }
    .tv-day-num { font-size: 1.3em; }
    .tv-day-sub { font-size: .55em; }
}

/* ═══════════════════════════════════════════════════════════════
   _city_combobox.php
   ═══════════════════════════════════════════════════════════════ */
.tv-city-combo {
    position: relative;
    display: inline-block;
    min-width: 180px;
    font-family: inherit;
}
.tv-city-combo-shell {
    display: flex; align-items: stretch;
    background: #fff;
    border: 1px solid var(--bs-border-color, #d1d5db);
    border-radius: 8px;
    overflow: hidden;
}
.tv-city-combo-input {
    flex: 1; min-width: 0;
    background: transparent;
    border: 0;
    padding: 6px 12px;
    font: inherit;
    font-weight: 600;
    color: #111;
    outline: none;
}
.tv-city-combo-input::placeholder { color: #9ca3af; font-weight: 500; }
.tv-city-combo-toggle {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--bs-border-color, #e5e7eb);
    padding: 0 10px;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.tv-city-combo-toggle:hover { background: #f3f4f6; color: #111; }

/* Clear (×) button — same shape as toggle, sits before it */
.tv-city-combo-clear {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--bs-border-color, #e5e7eb);
    padding: 0 8px;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.tv-city-combo-clear:hover { background: #fee2e2; color: #b91c1c; }
.tv-city-combo-clear[hidden] { display: none; }

/* Header variant: white-on-green pill style */
.tv-city-combo--header .tv-city-combo-shell {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
}
.tv-city-combo--header .tv-city-combo-input {
    color: #fff;
    font-size: .95em;
    padding: 4px 10px;
}
.tv-city-combo--header .tv-city-combo-input::placeholder { color: rgba(255,255,255,.7); }
.tv-city-combo--header .tv-city-combo-toggle {
    color: #fff;
    border-right-color: rgba(255,255,255,.25);
}
.tv-city-combo--header .tv-city-combo-toggle:hover { background: rgba(255,255,255,.15); }
.tv-city-combo--header .tv-city-combo-clear {
    color: rgba(255,255,255,.85);
    border-right-color: rgba(255,255,255,.25);
}
.tv-city-combo--header .tv-city-combo-clear:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Dropdown list */
.tv-city-combo-list {
    position: absolute;
    z-index: 1080;
    top: calc(100% + 4px);
    right: 0; left: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--bs-border-color, #d1d5db);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 4px 0;
    color: #111;
}
.tv-city-combo-group {
    font-size: .72em; font-weight: 700;
    color: #6b7280;
    padding: 6px 12px 4px;
    text-transform: none;
    background: #f9fafb;
    position: sticky; top: 0;
}
.tv-city-combo-item {
    display: block; width: 100%;
    background: transparent;
    border: 0;
    text-align: right;
    padding: 6px 12px;
    cursor: pointer;
    font: inherit;
    color: #111;
}
.tv-city-combo-item:hover,
.tv-city-combo-item.is-active {
    background: var(--bs-tertiary-bg, #eff6ff);
}
.tv-city-combo-item.is-selected {
    background: rgba(22,163,74,.12);
    font-weight: 700;
}
.tv-city-combo-empty {
    padding: 12px;
    color: #9ca3af;
    font-size: .9em;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   _footer.php
   ═══════════════════════════════════════════════════════════════ */
/* [VARIENT-MOD] footer widget columns */
.tv-footer-widgets {
    background: #0b4d49;
    padding: 40px 0 32px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.tv-footer-widgets .sidebar-widget {
    color: rgba(255,255,255,.85);
}
.tv-footer-widgets .sidebar-widget .widget-head .title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,.15);
    margin-bottom: 14px;
}
.tv-footer-widgets .sidebar-widget .widget-body {
    color: rgba(255,255,255,.75);
}
/* post items inside footer widgets */
.tv-footer-widgets .post-item-small .post-title a {
    color: rgba(255,255,255,.88);
}
.tv-footer-widgets .post-item-small .post-title a:hover {
    color: #fff;
}
.tv-footer-widgets .post-item-small .post-meta {
    color: rgba(255,255,255,.5);
}

/* [VARIENT-MOD] taghvim — slim 3-item footer (logo · copyright · newsletter). */
.tv-footer-slim {
    background: #083f3c;
    color: rgba(255,255,255,.78);
    padding: 14px 0;
    font-size: .88em;
}
.tv-footer-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.tv-footer-logo img {
    max-height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
}
/* logo + copyright glued together on the right side */
.tv-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
}
.tv-footer-copyright {
    color: rgba(255,255,255,.72);
    font-size: .85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tv-footer-copyright a { color: rgba(255,255,255,.92); }

/* Compact inline newsletter form */
.tv-footer-newsletter {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    padding: 3px 3px 3px 14px;
    overflow: hidden;
    min-width: 260px;
}
.tv-footer-newsletter input[type="email"] {
    flex: 1;
    background: transparent;
    border: 0;
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: .92em;
    padding: 6px 4px;
    min-width: 0;
}
.tv-footer-newsletter input[type="email"]::placeholder {
    color: rgba(255,255,255,.55);
}
.tv-footer-newsletter input[type="text"] {
    /* [VARIENT-MOD] honeypot field — use sr-only pattern.
       The previous `left: -9999px` trick puts the field 9999px to the LEFT of
       its containing block.  On Chrome RTL pages this is counted as document
       scroll-width, blowing up the page width and breaking the mobile layout. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}
.tv-footer-newsletter button {
    background: var(--tv-accent, #0d6e68);
    color: #fff;
    border: 0;
    padding: 7px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .88em;
    cursor: pointer;
    transition: filter .15s;
    white-space: nowrap;
}
.tv-footer-newsletter button:hover { filter: brightness(1.15); }

/* [VARIENT-MOD] messenger icons — center of footer row */
.tv-footer-messengers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.tv-footer-msg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s;
    flex-shrink: 0;
}
.tv-footer-msg-icon i { font-size: 1.15rem; line-height: 1; }
.tv-footer-msg-icon:hover {
    background: var(--msg-color);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .tv-footer-row { gap: 10px; }
    .tv-footer-left { flex-basis: 100%; }
    .tv-footer-copyright { white-space: normal; }
    .tv-footer-messengers { order: 2; }
    .tv-footer-newsletter { width: 100%; order: 3; }
}

/* [SERE-MOD] tiny single-line footer nav strip — below the main slim footer */
.tv-footer-menu {
    background: #052e2c;
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 8px 0;
    font-size: .78em;
}
.tv-footer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1.4;
}
.tv-footer-menu-list li {
    display: inline-flex;
    align-items: center;
}
.tv-footer-menu-list li + li::before {
    content: "·";
    color: rgba(255,255,255,.35);
    margin: 0 10px;
    font-weight: 700;
}
.tv-footer-menu-list a {
    color: rgba(255,255,255,.62);
    text-decoration: none;
    padding: 2px 0;
    transition: color .15s;
    white-space: nowrap;
}
.tv-footer-menu-list a:hover { color: #fff; }
.tv-footer-menu-list a i { margin-inline-end: 4px; opacity: .8; }
@media (max-width: 480px) {
    .tv-footer-menu { font-size: .74em; }
    .tv-footer-menu-list li + li::before { margin: 0 6px; }
}

/* ═══════════════════════════════════════════════════════════════
   _home_countdown_widget.php
   ═══════════════════════════════════════════════════════════════ */
.tv-hc-wrap {
    background: var(--bs-body-bg, #fff);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
    margin-bottom: 14px;
}
.tv-hc-head {
    text-align: center;
    padding: 14px 16px 16px;
    background: #fff;
    color: #b91c1c;
    font-weight: 800;
    font-size: 1.2em;
    position: relative;
}
.tv-hc-head::before {
    content: ''; display: block;
    background: #14b8a6;
    height: 5px; width: 100%;
    position: absolute; top: 0; left: 0;
}
.tv-hc-head a {
    color: inherit; text-decoration: none;
}
.tv-hc-head a:hover { text-decoration: underline; }

.tv-hc-body {
    background:
        radial-gradient(circle at 20% 30%, #a78bfa 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, #c4b5fd 0%, transparent 50%),
        linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    padding: 22px 12px 26px;
    display: flex; justify-content: center; gap: 12px;
    flex-wrap: nowrap;
    /* [SERE-MOD] Days on the right → seconds on the left (Persian
       descending-unit reading order). */
    flex-direction: row-reverse;
}
.tv-hc-tile {
    background: #18181b;
    color: #fff;
    border-radius: 10px;
    padding: 10px 6px 10px;
    min-width: 64px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    font-variant-numeric: tabular-nums;
}
.tv-hc-num {
    font-size: 1.6em; font-weight: 800;
    line-height: 1.1;
}
.tv-hc-label {
    font-size: .72em;
    color: #d1d5db;
    margin-top: 4px;
    letter-spacing: .02em;
}
.tv-hc-done {
    text-align: center;
    color: #fff;
    padding: 20px;
    font-weight: 700;
}

@media (max-width: 380px) {
    .tv-hc-tile { min-width: 52px; padding: 8px 4px; }
    .tv-hc-num  { font-size: 1.3em; }
    .tv-hc-head { font-size: 1em; padding: 12px 12px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   _month_events_widget.php
   ═══════════════════════════════════════════════════════════════ */
.tv-month-events-list .tv-mel-link.is-holiday .tv-mel-title { color: #dc3545; font-weight: 600; }
.tv-month-events-list .tv-mel-orig {
    display: inline-block;
    font-size: .72rem;
    margin-inline-start: .25rem;
    color: #6c757d;
    font-weight: 400;
}
.tv-mel-toggle-btn {
    background: none;
    border: 1px solid #ced4da;
    border-radius: 999px;
    padding: 4px 16px;
    font-size: .82rem;
    color: #495057;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.tv-mel-toggle-btn:hover { background: #f1f3f5; }
.tv-mel-toggle-btn.is-open { color: #dc3545; border-color: #dc3545; }

/* ═══════════════════════════════════════════════════════════════
   _nav_main.php
   ═══════════════════════════════════════════════════════════════ */
/* [VARIENT-MOD] taghvim — uniform icon-only nav buttons.
   Icons forced white (the menu sits on a black bar). */
.tv-nav-actions { gap: 6px; }
.tv-nav-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    padding: 0;
}
.tv-nav-icon-btn:hover,
.tv-nav-icon-btn:focus { color: #fff; }
.tv-nav-icon-btn svg { color: #fff; stroke: currentColor; }
.tv-nav-icon-btn:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.22);
}
.tv-nav-icon-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,.5); outline-offset: 1px;
}
/* Search button uses the same look */
.mega-menu-wrapper .search-icon-btn { color: #fff !important; }
.mega-menu-wrapper .search-icon-btn svg { color: #fff; }

.hdr-search-scope {
    background: var(--bs-tertiary-bg, #f5f6f8);
    border: 1px solid var(--bs-border-color, #e4e7ed);
    border-radius: 999px; padding: 2px;
}
.hdr-search-pill { margin: 0; cursor: pointer; }
.hdr-search-pill input { position: absolute; opacity: 0; pointer-events: none; }
.hdr-search-pill span {
    display: inline-block; padding: 5px 12px;
    border-radius: 999px;
    font-size: .82em; font-weight: 700; line-height: 1;
    color: var(--bs-secondary-color, #6b7280);
    transition: .15s;
    user-select: none;
}
.hdr-search-pill input:checked + span {
    background: var(--vr-theme-color, #0d6e68); color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   _owghat_widget.php
   ═══════════════════════════════════════════════════════════════ */
/* ── Header with inline city picker ──────────────────────────── */
.tv-owghat-widget .tv-ow-head {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.tv-ow-head-title { font-weight: 700; }
.tv-ow-head-dash  { opacity: .6; margin: 0 2px; }
.tv-ow-head-form  { margin: 0; padding: 0; flex: 0 0 auto; }
.tv-ow-head-select {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
    font-weight: 700;
    font-size: .95em;
    padding: 3px 26px 3px 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path fill='%23fff' d='M6 8.5L1.5 4h9z'/></svg>");
    background-repeat: no-repeat;
    background-position: left 8px center;
}
.tv-ow-head-select:hover  { background-color: rgba(255,255,255,.28); }
.tv-ow-head-select:focus  { outline: 2px solid rgba(255,255,255,.6); outline-offset: 1px; }
/* Native dropdown options render in the OS theme; force readable colors */
.tv-ow-head-select option,
.tv-ow-head-select optgroup { color: #111; background: #fff; }
.tv-ow-qibla {
    background: rgba(255,255,255,.18);
    padding: 2px 8px; border-radius: 999px;
    font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr;
    font-size: .82em;
}
.tv-ow-today {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--tv-side-accent) 12%, transparent),
        transparent);
    border-bottom: 1px solid var(--bs-border-color, #e4e7ed);
}
.tv-ow-today-badge {
    font-size: .75em; font-weight: 700;
    background: var(--tv-side-accent); color:#fff;
    padding: 2px 8px; border-radius: 999px;
}
.tv-ow-today-shamsi { font-weight: 700; font-size: .92em; }

.tv-ow-next {
    background: color-mix(in srgb, var(--tv-side-accent) 14%, transparent);
    border-bottom: 1px solid var(--bs-border-color, #e4e7ed);
    font-size: .92em;
}
.tv-ow-next-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--tv-side-accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--tv-side-accent) 60%, transparent);
    animation: tvOwPulse 1.6s ease-out infinite;
    display: inline-block;
}
@keyframes tvOwPulse {
    0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--tv-side-accent) 60%, transparent); }
    100% { box-shadow: 0 0 0 10px transparent; }
}
.tv-ow-next-remaining {
    font-weight: 800;
    color: var(--tv-side-accent);
    font-variant-numeric: tabular-nums;
}

/* ── Two-column prayer-times grid ───────────────────────────── */
.tv-owghat-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.tv-owghat-list li {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center; gap: 8px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--bs-border-color, #e4e7ed);
    border-left:   1px solid var(--bs-border-color, #e4e7ed);
    transition: background .15s;
    min-width: 0;
}
/* Right column has no left border (RTL: visual right edge) */
.tv-owghat-list li:nth-child(2n) { border-left: none; }
/* Last row's bottom border off */
.tv-owghat-list li:nth-last-child(-n+2):not(:nth-child(2n+1)) { border-bottom: none; }
/* If odd count, the lone last cell spans both columns */
.tv-owghat-list li:last-child:nth-child(2n+1) {
    grid-column: 1 / -1;
    border-bottom: none;
    border-left: none;
}
.tv-owghat-list li.is-next {
    background: color-mix(in srgb, var(--tv-side-accent) 9%, transparent);
    position: relative;
}
.tv-owghat-list li.is-next::before {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0;
    width: 3px; background: var(--tv-side-accent);
}
.tv-ow-icon  { font-size: 1em;  text-align: center; }
.tv-ow-label { font-size: .85em; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-owghat-list li.is-next .tv-ow-label { color: var(--tv-side-accent); }
.tv-ow-time {
    font-size: .95em; font-weight: 800;
    color: var(--tv-side-accent, var(--tv-day-accent));
    font-variant-numeric: tabular-nums; direction: ltr;
}

/* ═══════════════════════════════════════════════════════════════
   _post_share.php
   ═══════════════════════════════════════════════════════════════ */
/* [VARIENT-MOD] BEGIN — compact share bar */

/* Share pill */
.tvsp-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .7rem;
    font-size: .8rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 20px;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    transition: background .13s, border-color .13s;
    white-space: nowrap;
}
.tvsp-pill:hover { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.3); }
[data-bs-theme="dark"] .tvsp-pill { border-color: rgba(255,255,255,.22); }
[data-bs-theme="dark"] .tvsp-pill:hover { background: rgba(255,255,255,.07); }
.tvsp-pill[aria-expanded="true"] .tvsp-caret { transform: rotate(180deg); }
.tvsp-caret { transition: transform .15s; }

/* Icon-only util buttons */
.tvsp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    transition: color .13s, background .13s, transform .13s;
}
.tvsp-icon:hover { color: #0d6efd; background: rgba(0,0,0,.04); transform: translateY(-1px); }
[data-bs-theme="dark"] .tvsp-icon { color: #bbb; }
[data-bs-theme="dark"] .tvsp-icon:hover { background: rgba(255,255,255,.07); }
.tvsp-icon.btn-reading-list.active { color: #f59e0b; }
.tvsp-icon.btn-reading-list.active:hover { color: #d97706; }

/* Dropdown menu */
.tvsp-drop-wrap { display: inline-block; }
/* Post meta row must not clip the share dropdown */
.pdm-row { overflow: visible !important; }
.pdm-share { position: relative; z-index: 5; }
.tvsp-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;         /* RTL: opens toward the left */
    z-index: 1050;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    padding: .5rem .35rem .35rem;
}
[data-bs-theme="dark"] .tvsp-menu {
    background: #1e1e2d;
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.tvsp-menu.is-open { display: block; }

/* 4-col chip grid */
.tvsp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .2rem;
}
.tvsp-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .18rem;
    padding: .45rem .2rem .35rem;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: .67rem;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    transition: color .12s, background .12s;
    white-space: nowrap;
}
.tvsp-chip i { font-size: 1.2rem; line-height: 1; }
.tvsp-chip:hover {
    color: var(--tv-hover, #0d6efd);
    background: rgba(0,0,0,.05);
    text-decoration: none;
}
[data-bs-theme="dark"] .tvsp-chip { color: #ccc; }
[data-bs-theme="dark"] .tvsp-chip:hover { background: rgba(255,255,255,.08); }
.tv-copy-btn.is-copied { color: #198754 !important; }
/* [VARIENT-MOD] END */

/* ═══════════════════════════════════════════════════════════════
   _quote_widget.php
   ═══════════════════════════════════════════════════════════════ */
.tv-quote-card {
    position: relative;
    background: var(--bs-body-bg, #fff);
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
    padding: 22px 28px 22px 64px;
    overflow: hidden;
}
.tv-quote-mark {
    position: absolute;
    left: 16px; top: 8px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4em;
    line-height: 1;
    color: var(--tv-quote-accent);
    opacity: .85;
    font-weight: 700;
}
.tv-quote-author {
    margin: 0 0 8px 0;
    font-weight: 800;
    color: var(--tv-quote-accent);
    font-size: 1em;
    line-height: 1.4;
}
.tv-quote-name   { font-weight: 800; }
.tv-quote-colon  { margin-inline-start: 2px; font-weight: 800; }
.tv-quote-source {
    font-weight: 400;
    color: var(--bs-secondary-color, #6b7280);
    margin-inline-start: 6px;
    font-size: .9em;
}
.tv-quote-body {
    margin: 0; padding: 0;
    font-size: 1.05em;
    line-height: 1.85;
    color: var(--bs-body-color);
    text-align: right;
    border: 0;
}
@media (max-width: 600px) {
    .tv-quote-card { padding: 18px 18px 18px 50px; }
    .tv-quote-mark { font-size: 3em; left: 12px; top: 6px; }
    .tv-quote-body { font-size: 1em; line-height: 1.75; }
}

/* ═══════════════════════════════════════════════════════════════
   _today_events.php
   ═══════════════════════════════════════════════════════════════ */
/* === Panel === */
.tv-panel {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
    margin-bottom: 14px;
}
.tv-panel-head {
    color: #fff; padding: 10px 16px;
    font-weight: 700; font-size: .9em;
    display: flex; align-items: center; gap: 6px;
}
.tv-panel-head small { font-weight: 400; opacity: .85; margin-right: 6px; }
.tv-panel-body { padding: 12px 16px; }

/* === Today events list === */
.tv-today-events { list-style: none; margin: 0; padding: 0; }
.tv-te-row {
    display: flex; gap: 8px; padding: 8px 0;
    border-bottom: 1px dashed var(--bs-border-color, #e2e5ea);
    align-items: flex-start;
}
.tv-te-row:last-child { border-bottom: none; }
.tv-te-row.tv-te-extra { display: none; }
.tv-today-events.expanded .tv-te-row.tv-te-extra { display: flex; }

.tv-te-tag {
    flex-shrink: 0; padding: 2px 8px; border-radius: 11px;
    font-size: .68em; font-weight: 700; margin-top: 2px; line-height: 1.6;
}
.tv-te-shamsi  { background: #dcfce7; color: #0d6e68; }
.tv-te-miladi  { background: #dbeafe; color: #1d4ed8; }
.tv-te-ghamari { background: #f3e8ff; color: #7c3aed; }
.tv-te-tabari  { background: #fef3c7; color: #a16207; }
.tv-te-daylami { background: #cffafe; color: #0e7490; }
.tv-te-kurdish { background: #fef3c7; color: #ca8a04; }
.tv-te-region  { background: #fce7f3; color: #be185d; }
.tv-te-hol     { background: #fee2e2; color: #dc2626; }

.tv-te-text {
    font-size: .86em; line-height: 1.55; flex: 1;
    text-decoration: none; color: var(--bs-body-color, #1a1d23);
}
.tv-te-text:hover { color: var(--tv-accent, #0d6e68); }

/* Dark-mode tag tints */
[data-bs-theme="dark"] .tv-te-shamsi  { background: #0f3a1f; color: #86efac; }
[data-bs-theme="dark"] .tv-te-miladi  { background: #1e293b; color: #93c5fd; }
[data-bs-theme="dark"] .tv-te-ghamari { background: #2e1a47; color: #c4b5fd; }
[data-bs-theme="dark"] .tv-te-tabari  { background: #3a2e10; color: #fcd34d; }
[data-bs-theme="dark"] .tv-te-daylami { background: #0d3d40; color: #67e8f9; }
[data-bs-theme="dark"] .tv-te-kurdish { background: #3a2e10; color: #fcd34d; }
[data-bs-theme="dark"] .tv-te-region  { background: #3a1a2e; color: #f9a8d4; }
[data-bs-theme="dark"] .tv-te-hol     { background: #3a1a1a; color: #fca5a5; }

/* Toggle button */
.tv-te-toggle {
    width: 100%; margin-top: 10px; padding: 8px 12px;
    background: rgba(0,0,0,.04); color: var(--tv-accent, #0d6e68);
    border: 1px dashed var(--tv-accent, #0d6e68); border-radius: 8px;
    font-family: inherit; font-size: .88em; font-weight: 700;
    cursor: pointer; transition: .15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tv-te-toggle:hover { background: var(--tv-accent, #0d6e68); color: #fff; }
.tv-te-toggle-icon { transition: transform .2s; }
.tv-te-toggle.expanded .tv-te-toggle-icon { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════════
   _today_panel.php
   ═══════════════════════════════════════════════════════════════ */
/* [VARIENT-MOD] Kill the gap between the menu (desktop sticky / mobile
   header) and the green hero. Earlier rules removed body+main margins,
   but a residual ~10px gap kept coming back from the sticky-menu
   wrapper's bottom margin/shadow and from <main>'s default block-
   formatting whitespace. Cap the visual gap at 2px. */
body { margin: 0; }
main { margin: 0 !important; padding: 0 !important; display: block; }
main > *:first-child { margin-top: 0 !important; }
#sticky-menu-wrapper,
#mega-menu-wrapper,
.mega-menu-wrapper,
.mobile-nav-wrapper,
.mobile-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    box-shadow: none !important;
}

/* Full-bleed hero — sits flush against the navbar, no rounding, no
   horizontal margin so it spans the entire viewport. */
.tv-today-hero {
    position: relative;
    overflow: hidden;
    background: var(--tv-accent);
    color: #fff;
    border-radius: 0;
    margin: 2px 0 1rem 0 !important;
    width: 100%;
    max-width: 100vw;   /* [VARIENT-MOD] guard for old browsers */
    box-sizing: border-box;
}
.tv-today-hero-inner {
    position: relative; z-index: 1;
    max-width: 1320px; margin: 0 auto;
    padding: 18px 16px;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch;
    gap: 14px; -ms-flex-wrap: wrap; flex-wrap: wrap;
    box-sizing: border-box;
}

/* Clock + inline shamsi date */
.tv-clock-box {
    -webkit-flex-shrink: 0; flex-shrink: 0;
    background: rgba(0,0,0,.18);
    border-radius: 12px;
    padding: 14px 18px;
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-orient: vertical; -webkit-box-direction: normal;
    -ms-flex-direction: column; flex-direction: column;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    min-width: 160px;
    max-width: 100%;
}
.tv-clock-time {
    font-size: 2.4em; font-weight: 700; letter-spacing: 3px;
    direction: ltr; font-variant-numeric: tabular-nums; line-height: 1;
}
.tv-clock-wd { font-size: .9em; opacity: .85; margin-top: 6px; text-align: center; }

/* Shamsi date strip under the clock — replaces what used to be the first tile */
.tv-clock-shamsi {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.18);
    width: 100%;
    text-align: center;
}
.tv-clock-shamsi-lbl {
    font-size: .76em; opacity: .75; font-weight: 700; letter-spacing: .3px;
    margin-bottom: 3px;
}
.tv-clock-shamsi-lbl span { font-weight: 400; opacity: .8; }
.tv-clock-shamsi-date {
    font-size: 1em; font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Six dates grid */
.tv-dates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.tv-td-tile {
    background: rgba(255,255,255,.10);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    text-align: center;
    transition: background-color .15s, transform .15s;
    color: #fff;            /* keep tile text white when rendered as <a> */
    text-decoration: none;
}
.tv-td-tile:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
    transform: translateY(-1px);
}
.tv-clock-shamsi {
    color: #fff;             /* keep shamsi-link text white */
    text-decoration: none;
    transition: background-color .15s;
    border-radius: 6px;
}
.tv-clock-shamsi:hover { color: #fff; background: rgba(255,255,255,.08); }
.tv-td-lbl {
    font-size: .76em; opacity: .75; font-weight: 700; letter-spacing: .3px;
}
.tv-td-lbl span { font-weight: 400; opacity: .8; }
.tv-td-num {
    font-size: .98em; font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) { .tv-dates-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .tv-today-hero-inner {
        -webkit-box-orient: vertical; -webkit-box-direction: normal;
        -ms-flex-direction: column; flex-direction: column;
    }
    .tv-clock-box { min-width: 0; width: 100%; box-sizing: border-box; }
    .tv-dates-grid { grid-template-columns: repeat(2, 1fr); width: 100%; }
}
@media (max-width: 400px) {
    .tv-dates-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   _tool_request_cta.php
   ═══════════════════════════════════════════════════════════════ */
.tv-trcta { margin-bottom: 16px; }
.tv-trcta-inner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
}
.tv-trcta-title { font-weight: 800; font-size: 1.02em; margin-bottom: 6px; color: #0f172a; }
.tv-trcta-sub   { font-size: .85em; color: #64748b; line-height: 1.7; margin-bottom: 14px; }

.tv-trcta-actions {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.tv-trcta-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px; font-size: .88em;
    font-weight: 700; border: 0; cursor: pointer; transition: all .15s;
    text-decoration: none;
}
.tv-trcta-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
}
.tv-trcta-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.25); color: #fff; }
.tv-trcta-btn-ghost {
    background: #fff; color: #0f172a; border: 1px solid #e2e8f0;
}
.tv-trcta-btn-ghost:hover { background: #f8fafc; color: #0f172a; }

.tv-trcta-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; text-align: right; }
.tv-trcta-form[hidden] { display: none !important; }
.tv-trcta-input {
    width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: .9em; font-family: inherit; background: #fff; color: #0f172a;
}
.tv-trcta-input:focus { outline: 0; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.tv-trcta-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .tv-trcta-form-row { grid-template-columns: 1fr; } }
.tv-trcta-form-actions { display: flex; gap: 6px; margin-top: 4px; }
.tv-trcta-captcha { margin-top: 4px; min-height: 30px; }
.tv-trcta-captcha:empty { display: none; }

[data-bs-theme="dark"] .tv-trcta-inner { background: linear-gradient(135deg, #1f2228 0%, #16181c 100%); border-color: #2a2d33; }
[data-bs-theme="dark"] .tv-trcta-title { color: #f1f5f9; }
[data-bs-theme="dark"] .tv-trcta-sub   { color: #94a3b8; }
[data-bs-theme="dark"] .tv-trcta-btn-ghost { background: #1f2228; color: #f1f5f9; border-color: #2a2d33; }
[data-bs-theme="dark"] .tv-trcta-btn-ghost:hover { background: #2a2d33; color: #f1f5f9; }
[data-bs-theme="dark"] .tv-trcta-input { background: #16181c; color: #f1f5f9; border-color: #2a2d33; }

/* ═══════════════════════════════════════════════════════════════
   _tools_promo.php
   ═══════════════════════════════════════════════════════════════ */
.tv-tools-promo {
    /* [VARIENT-MOD] Pinned to the bottom-LEFT corner.
       IMPORTANT: hide via translateY (down) NOT translateX (left).
       translateX(-110%) puts the panel ~354px to the left of the
       viewport; Chrome RTL counts that as document scroll-width and
       shifts all page content to the right.  Sliding up from the bottom
       avoids any horizontal overflow entirely. */
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    z-index: 1000;
    background: linear-gradient(135deg, #2c2541 0%, #1e1a2e 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    overflow: hidden;
    transform: translateY(calc(100% + 40px));
    opacity: 0;
    transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s;
}
.tv-tools-promo.is-shown {
    transform: translateY(0);
    opacity: 1;
}
.tv-tools-promo-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 2.4rem .85rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background .2s;
}
.tv-tools-promo-link:hover { background: rgba(255,255,255,.04); color: inherit; }
.tv-tools-promo-icon {
    flex: 0 0 auto;
    font-size: 1.7rem; line-height: 1;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    background: rgba(255,255,255,.08);
    border-radius: 10px;
}
.tv-tools-promo-text {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column; gap: .15rem;
}
.tv-tools-promo-title {
    font-weight: 700; font-size: .98rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-tools-promo-desc {
    font-size: .8rem; opacity: .78; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.tv-tools-promo-close {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    background: rgba(255,255,255,.1); color: #fff;
    border: 0; border-radius: 50%;
    width: 24px; height: 24px;
    font-size: 1rem; line-height: 1;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background .15s;
    z-index: 2;
}
.tv-tools-promo-close:hover { background: rgba(255,255,255,.22); }
@media (max-width: 540px) {
    /* On phones, drop the description and shrink to a single-line pill
       with just the title — saves vertical space + keeps the footer
       area uncluttered. */
    .tv-tools-promo { left: 12px; right: 12px; bottom: 12px; width: auto; border-radius: 999px; }
    .tv-tools-promo-link { padding: .55rem 2.2rem .55rem .85rem; gap: .6rem; }
    .tv-tools-promo-icon { width: auto; height: auto; background: none; border-radius: 0; font-size: 1.25rem; }
    .tv-tools-promo-desc { display: none; }
    .tv-tools-promo-title { font-size: .9rem; }
}

/* ═══════════════════════════════════════════════════════════════
   _tools_widget.php
   ═══════════════════════════════════════════════════════════════ */
/* Shared styles for sidebar widgets — applied once, all widgets inherit. */
.tv-side-widget {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .07);
    overflow: hidden;
}
.tv-side-head {
    background: var(--tv-side-accent);
    color: #fff;
    padding: 11px 18px;
    font-weight: 700;
    font-size: .92em;
}
.tv-side-body { padding: 14px 18px; }
.tv-side-body .form-select-sm,
.tv-side-body .form-control-sm { font-size: .9em; }

/* List layout — one link per row. */
.tv-side-links--list li { margin-bottom: 6px; }
.tv-side-links--list li:last-child { margin-bottom: 0; }

/* [VARIENT-MOD] 2-col layout — used on internal tool pages where the
   sidebar is narrow but the list would otherwise be very tall. */
.tv-side-links--2col {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px;
}
.tv-side-links--2col li { margin: 0; }

/* Grid layout — 3 columns on homepage. */
.tv-side-links--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.tv-side-links--grid li { margin: 0; }
@media (max-width: 768px) {
    .tv-side-links--grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
    .tv-side-links--grid { grid-template-columns: 1fr; }
}

.tv-side-link {
    display: flex; justify-content: space-between; align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bs-tertiary-bg, #f5f6f8);
    border: 1px solid var(--bs-border-color, transparent);
    border-radius: 8px;
    text-decoration: none;
    color: var(--bs-body-color);
    font-weight: 700; font-size: .9em;
    transition: background-color .15s, transform .15s, border-color .15s;
}
.tv-side-link:hover {
    background: var(--bs-body-bg, #fff);
    border-color: var(--tv-side-accent);
    color: var(--tv-side-accent);
    transform: translateX(-2px);
}
.tv-side-link-icon { font-size: 1.05em; opacity: .9; flex-shrink: 0; }

/* Compact cell links: smaller font + single-line + ellipsis truncation. */
.tv-side-links--grid .tv-side-link,
.tv-side-links--2col .tv-side-link {
    padding: 8px 10px;
    font-size: .8em;
    min-width: 0;
}
.tv-side-links--grid .tv-side-link-text,
.tv-side-links--2col .tv-side-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; flex: 1;
}
.tv-side-links--grid .tv-side-link:hover,
.tv-side-links--2col .tv-side-link:hover { transform: translateY(-1px); }

[data-bs-theme="dark"] .tv-side-link {
    background: rgba(255,255,255,.04);
}
[data-bs-theme="dark"] .tv-side-link:hover {
    background: rgba(255,255,255,.08);
}

/* ═══════════════════════════════════════════════════════════════
   _top_holiday_tags.php
   ═══════════════════════════════════════════════════════════════ */
.tv-top-tags-card .tv-top-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .55rem;
    background: rgba(0,0,0,.04);
    color: #444;
    text-decoration: none;
    border-radius: 999px;
    line-height: 1.45;
    transition: all .15s ease;
}
.tv-top-tags-card .tv-top-tag-chip:hover {
    background: var(--tv-events-accent);
    color: #fff;
    transform: translateY(-1px);
}
.tv-top-tags-card .tv-top-tag-chip.is-active {
    background: var(--tv-events-accent);
    color: #fff;
    font-weight: 600;
}
.tv-top-tag-count {
    background: rgba(255,255,255,.4);
    color: inherit;
    font-size: 0.7em;
    padding: 0 .35em;
    border-radius: 999px;
    font-weight: 600;
}
.tv-top-tags-card .tv-top-tag-chip:hover .tv-top-tag-count,
.tv-top-tags-card .tv-top-tag-chip.is-active .tv-top-tag-count {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   _year_stats.php
   ═══════════════════════════════════════════════════════════════ */
.tv-year-stats {
    background: var(--bs-body-bg, #fff);
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
    overflow: hidden;
    --tv-stats-accent: #0d6e68;
    margin-bottom: 1rem;
}
.tv-stats-head {
    background: var(--tv-stats-accent);
    color: #fff;
    padding: 11px 16px;
    font-weight: 700; font-size: .92em;
    display: flex; align-items: center; gap: 8px;
}
.tv-stats-emoji { font-size: 1.05em; }
.tv-stats-pct {
    margin-right: auto;
    background: rgba(255,255,255,.22);
    padding: 2px 10px; border-radius: 999px;
    font-variant-numeric: tabular-nums;
    font-size: .85em;
}

/* Countdown — title row with inline caption + 4-cell timer */
.tv-stats-cd {
    padding: 12px 14px 14px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--tv-stats-accent) 6%, transparent),
        transparent);
    border-bottom: 1px solid var(--bs-border-color, #e4e7ed);
}
.tv-stats-cd-title {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
    font-size: .85em; font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 10px;
}
.tv-stats-cd-icon { font-size: 1em; }
.tv-stats-cd-label { font-weight: 800; color: var(--tv-stats-accent); }
.tv-stats-cd-when {
    font-weight: 600;
    color: var(--bs-secondary-color, #6b7280);
    font-size: .92em;
}
/* [VARIENT-MOD] LTR — day (largest) on the LEFT, second on the right.
   Matches digital-clock convention regardless of page direction. */
.tv-stats-cd-row {
    display: flex; align-items: stretch; gap: 4px;
    justify-content: space-between;
    direction: ltr;
}
.tv-cd-cell {
    flex: 1;
    background: var(--tv-stats-accent);
    color: #fff;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    line-height: 1.05;
    min-width: 0;
}
.tv-cd-num {
    display: block;
    font-size: 1.35em; font-weight: 800;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.tv-cd-lbl {
    display: block;
    font-size: .65em;
    opacity: .85;
    margin-top: 2px;
}
.tv-cd-sep {
    display: flex; align-items: center;
    font-weight: 800; opacity: .35;
    font-size: 1.1em; color: var(--tv-stats-accent);
}

/* Full-width track — elapsed = colored, remaining = gray. */
.tv-stats-bar {
    height: 8px;
    background: var(--bs-tertiary-bg, #e5e7eb);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--bs-border-color, #d1d5db);
}
.tv-stats-bar-fill {
    height: 100%;
    background: var(--tv-stats-accent);
    transition: width .6s ease;
}
.tv-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.tv-stats-cell {
    padding: 12px 8px;
    text-align: center;
    border-left: 1px solid var(--bs-border-color, #e4e7ed);
}
.tv-stats-cell:first-child { border-left: none; }
.tv-stats-num {
    font-size: 1.3em; font-weight: 800;
    color: var(--tv-stats-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.tv-stats-lbl {
    font-size: .75em; color: var(--bs-secondary-color, #6b7280);
    margin-top: 4px;
}

/* Compact variant (sidebar use) — [VARIENT-MOD] 4-col grid + inline caption.
   Falls back to 2×2 + wrapped caption on narrow viewports. */
.tv-year-stats.is-compact .tv-stats-cell { padding: 9px 6px; }
.tv-year-stats.is-compact .tv-stats-num   { font-size: 1.15em; }
.tv-year-stats.is-compact .tv-cd-num      { font-size: 1.15em; }
.tv-year-stats.is-compact .tv-cd-lbl      { font-size: .6em; }
.tv-year-stats.is-compact .tv-stats-cd-title { font-size: .78em; }
.tv-year-stats.is-compact .tv-stats-cd-when  { font-size: .82em; }

@media (max-width: 520px) {
    .tv-year-stats.is-compact .tv-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tv-year-stats.is-compact .tv-stats-cell:nth-child(2) { border-left: none; }
    .tv-year-stats.is-compact .tv-stats-cell:nth-child(n+3) {
        border-top: 1px solid var(--bs-border-color, #e4e7ed);
    }
    .tv-year-stats.is-compact .tv-stats-cd-when { flex-basis: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   _home_convert_form.php + _convert_form.php (compact/full)
   ═══════════════════════════════════════════════════════════════ */
.tv-home-conv .tv-cform { margin: 0; }

/* Compact grid — full width: تقویم | روز | ماه | سال | تبدیل */
.tv-cform-compact .tv-cform-grid-compact {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.65fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.7fr);
    gap: 6px;
    align-items: end;
}
.tv-cform-compact .tv-cform-field {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.tv-cform-compact .tv-cform-field-cal   { grid-column: 1; }
.tv-cform-compact .tv-cform-field-day   { grid-column: 2; }
.tv-cform-compact .tv-cform-field-month { grid-column: 3; }
.tv-cform-compact .tv-cform-field-year  { grid-column: 4; }
.tv-cform-compact .tv-cform-submit-cell {
    grid-column: 5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}
.tv-cform-compact .tv-cform-submit-spacer {
    display: block;
    height: 1.05rem;
    margin-bottom: 0;
}
.tv-cform-compact .tv-cform-field legend {
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    font-size: .72rem;
    font-weight: 700;
    color: var(--bs-secondary-color, #6b7280);
    text-align: center;
    line-height: 1.2;
    float: none;
}
.tv-cform-compact .tv-cform-field .form-select,
.tv-cform-compact .tv-cform-field .form-control {
    width: 100%;
    min-height: 30px;
    padding: 4px 2px;
    font-size: .78rem;
}
.tv-cform-compact .tv-cform-field-month .form-select {
    padding-left: 18px;
    padding-right: 2px;
}
.tv-cform-compact .tv-cform-submit {
    width: 100%;
    margin: 0;
    padding: 5px 2px;
    font-size: .72rem;
    line-height: 1.2;
    min-height: 30px;
    background-color: var(--tv-side-accent) !important;
    border: 0 !important;
    color: #fff !important;
}
.tv-cform-compact .tv-cform-submit:hover,
.tv-cform-compact .tv-cform-submit:focus {
    filter: brightness(.92);
    color: #fff !important;
    background-color: var(--tv-side-accent) !important;
}

/* Full-page convert tool form (tools/convert) */
.tv-cform:not(.tv-cform-compact) .tv-cform-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grid-inline {
    flex-wrap: nowrap;
    gap: 8px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-row-date {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex-shrink: 1;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp-cal {
    flex: 1 1 0;
    min-width: 118px;
    max-width: 168px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp-era {
    flex: 0 1 132px;
    min-width: 108px;
    max-width: 148px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp-day {
    width: 58px;
    flex: 0 0 58px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp-year {
    width: 76px;
    flex: 0 0 76px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-grp-month {
    flex: 0 1 132px;
    min-width: 118px;
    max-width: 150px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    min-height: 1.2em;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-lbl-actions {
    visibility: hidden;
    user-select: none;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-select,
.tv-cform:not(.tv-cform-compact) .tv-cform-num {
    width: 100%;
    font-size: .85rem;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-actions {
    flex: 0 0 auto;
    min-width: 0;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-actions-btns {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-submit {
    background: var(--tv-accent);
    border: 0;
    padding: 6px 12px;
    white-space: nowrap;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-today {
    white-space: nowrap;
    padding: 6px 10px;
}
.tv-cform:not(.tv-cform-compact) .tv-cform-submit:hover {
    filter: brightness(.95);
    color: #fff;
}
@media (max-width: 991px) {
    .tv-cform:not(.tv-cform-compact) .tv-cform-grid-inline {
        flex-wrap: wrap;
    }
    .tv-cform:not(.tv-cform-compact) .tv-cform-actions {
        flex: 1 1 100%;
    }
    .tv-cform:not(.tv-cform-compact) .tv-cform-actions-btns {
        justify-content: flex-start;
    }
}
[data-bs-theme="dark"] .tv-cform:not(.tv-cform-compact) .tv-cform-lbl {
    color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════════
   Breadcrumb bar + spacing below sticky nav
   ═══════════════════════════════════════════════════════════════ */
.tv-breadcrumb-bar {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.7rem 0;
}
main > .tv-breadcrumb-bar:first-child {
    margin-top: 0.85rem !important;
}
.tv-breadcrumb-bar .breadcrumb {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    --bs-breadcrumb-divider: "›";
}
.tv-breadcrumb-bar .breadcrumb-item {
    display: flex;
    align-items: center;
    color: #64748b;
}
.tv-breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    float: none;
    padding-inline: 0.5rem;
    color: #94a3b8;
    font-weight: 600;
}
.tv-breadcrumb-bar .breadcrumb-item a {
    color: #0d6e68;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.tv-breadcrumb-bar .breadcrumb-item a:hover {
    color: #0a5752;
    text-decoration: underline;
}
.tv-breadcrumb-bar .breadcrumb-item.active {
    color: #334155;
    font-weight: 600;
    max-width: min(100%, 36rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-bs-theme="dark"] .tv-breadcrumb-bar {
    background: linear-gradient(180deg, #1a1d24 0%, #14171c 100%);
    border-bottom-color: #2a2d33;
}
[data-bs-theme="dark"] .tv-breadcrumb-bar .breadcrumb-item a {
    color: #5eead4;
}
[data-bs-theme="dark"] .tv-breadcrumb-bar .breadcrumb-item.active {
    color: #cbd5e1;
}

/* Inner pages: keep gap between nav and content (homepage hero stays flush) */
main > .container.tv-countdown-page,
main > .container.tv-cdi-page {
    margin-top: 1.25rem !important;
    margin-bottom: 2rem;
}

/* In-page breadcrumbs inside containers (calendar/tools/posts) */
main .container nav[aria-label="breadcrumb"] .breadcrumb,
main .container-xl nav[aria-label="breadcrumb"] .breadcrumb,
main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb,
.tv-breadcrumb.tv-breadcrumb--content .breadcrumb {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    --bs-breadcrumb-divider: "›";
}
main .container nav[aria-label="breadcrumb"] .breadcrumb-item a,
main .container-xl nav[aria-label="breadcrumb"] .breadcrumb-item a,
main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb-item a,
.tv-breadcrumb.tv-breadcrumb--content .breadcrumb-item a {
    color: #0d6e68;
    font-weight: 600;
    text-decoration: none;
}
main .container nav[aria-label="breadcrumb"] .breadcrumb-item a:hover,
main .container-xl nav[aria-label="breadcrumb"] .breadcrumb-item a:hover,
main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb-item a:hover,
.tv-breadcrumb.tv-breadcrumb--content .breadcrumb-item a:hover {
    color: #0a5752;
    text-decoration: underline;
}
main .container nav[aria-label="breadcrumb"] .breadcrumb-item.active,
main .container-xl nav[aria-label="breadcrumb"] .breadcrumb-item.active,
main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb-item.active,
.tv-breadcrumb.tv-breadcrumb--content .breadcrumb-item.active {
    color: #64748b;
    font-weight: 600;
}
main .container nav[aria-label="breadcrumb"] .breadcrumb-item + .breadcrumb-item::before,
main .container-xl nav[aria-label="breadcrumb"] .breadcrumb-item + .breadcrumb-item::before,
main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb-item + .breadcrumb-item::before,
.tv-breadcrumb.tv-breadcrumb--content .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
    font-weight: 600;
}
[data-bs-theme="dark"] main .container nav[aria-label="breadcrumb"] .breadcrumb,
[data-bs-theme="dark"] main .container-xl nav[aria-label="breadcrumb"] .breadcrumb,
[data-bs-theme="dark"] main .container-fluid nav[aria-label="breadcrumb"] .breadcrumb,
[data-bs-theme="dark"] .tv-breadcrumb.tv-breadcrumb--content .breadcrumb {
    background: #1a1d24;
    border-color: #2a2d33;
}
