/* =============================================================
   Newspaper Subscription – front-end styles
   Follows the site's cart page design language:
     • Coral accent   #ff6b6b / #ff4d4d
     • CTA buttons    linear-gradient(135deg, #e65429, #f08726)
     • Cards          border-radius:12px + box-shadow 0 10px 30px rgba(0,0,0,.08)
     • Inputs         border-radius:8px, 2px solid #ddd, focus:#ff6b6b
     • Transitions    0.2s ease (color), 0.3s ease (transform)
   ============================================================= */

/* ── Selector container ─────────────────────────────────────── */
.ns-issue-selector {
    margin: 1.5em 0;
    padding: 20px 22px;
    background: var(--ns-selector-bg, #fff);
    border: 1px solid var(--ns-selector-border, #eee);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ── Subscription info line ─────────────────────────────────── */
.ns-subscription-info {
    margin: 0 0 1em;
    font-size: 0.88em;
    color: #666;
    letter-spacing: 0.2px;
}

/* ── Fieldset reset ─────────────────────────────────────────── */
.ns-selector-fieldset {
    margin: 0;
    padding: 0;
    border: none;
}

.ns-selector-legend {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff6b6b;
}

/* ── Issue option cards ─────────────────────────────────────── */
.ns-issue-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ns-issue-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ns-issue-option:hover {
    background: #fafafa;
    border-color: #ddd;
}

.ns-issue-option.ns-selected,
.ns-issue-option:has(input:checked) {
    border-color: var(--ns-selected-border, #ff6b6b);
    box-shadow: 0 0 0 3px var(--ns-selected-shadow, rgba(255, 107, 107, 0.12));
    background: #fff;
}

/* ── Custom radio dot ───────────────────────────────────────── */
.ns-radio-dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
}

.ns-radio-dot--checked {
    border-color: #ff6b6b;
    background: #ff6b6b;
}

.ns-radio-dot--checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* ── Option content ─────────────────────────────────────────── */
.ns-option-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ns-option-label {
    font-weight: 600;
    color: #222;
}

.ns-option-date {
    margin-left: auto;
    font-size: 0.82em;
    color: #888;
}

/* ── Badges ─────────────────────────────────────────────────── */
.ns-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
    border: 1px solid;
}

.ns-badge--current {
    background: var(--ns-badge-current-bg, #fff0f0);
    color: var(--ns-badge-current-color, #ff4d4d);
    border-color: var(--ns-badge-current-border, #ffcccc);
}

.ns-badge--upcoming {
    background: var(--ns-badge-upcoming-bg, #fff5ee);
    color: var(--ns-badge-upcoming-color, #e65429);
    border-color: var(--ns-badge-upcoming-border, #f5c9a8);
}

/* ── Buttons ────────────────────────────────────────────────── */
.ns-atc-btn,
.ns-buy-now-btn {
    display: block;
    width: 100%;
    border: none !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
    cursor: pointer;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.ns-atc-btn {
    background: linear-gradient(135deg, #e65429, #f08726) !important;
    color: #fff !important;
    margin-top: 16px;
}

.ns-atc-btn:hover {
    background: linear-gradient(135deg, #f08726, #e65429) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
}

.ns-buy-now-btn {
    background: #fff !important;
    color: #e65429 !important;
    border: 2px solid #e65429 !important;
    margin-top: 8px;
}

.ns-buy-now-btn:hover {
    background: linear-gradient(135deg, #e65429, #f08726) !important;
    color: #fff !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

/* ── AJAX notice ─────────────────────────────────────────────── */
.ns-ajax-notice {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
}

.ns-notice--success {
    background: #fff0f0;
    color: #ff4d4d;
    border: 1px solid #ffcccc;
}

.ns-notice--error {
    background: #fff5ee;
    color: #e65429;
    border: 1px solid #f5c9a8;
}

/* ── No-issues fallback ──────────────────────────────────────── */
.ns-no-issues {
    margin: 1em 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ns-option-date {
        margin-left: 0;
        width: 100%;
    }

    .ns-issue-selector {
        padding: 14px;
    }
}

/* ===================================================================
   My Account → Twoje numery PDF
   Tokens follow the Replika design language: coral headings, the
   135deg coral→amber gradient for primary actions, 12px cards.
   =================================================================== */

.ns-downloads-table {
    --ns-dl-grad:       linear-gradient(135deg, #e65429, #f08726);
    --ns-dl-grad-hover: linear-gradient(135deg, #f08726, #e65429);
    --ns-dl-accent:     #ff6b6b;
    --ns-dl-muted:      #8a8a8a;
    --ns-dl-border:     #f0f0f0;

    width: 100%;
    margin: 0 0 24px;
    border: 1px solid var(--ns-dl-border);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    background: #fff;
}

.ns-downloads-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--ns-dl-border);
    vertical-align: middle;
}
.ns-downloads-table tr:first-child td { border-top: 0; }

.ns-dl-name {
    font-weight: 600;
    color: #2b2b2b;
}

.ns-dl-meta {
    display: block;
    margin-top: 3px;
    font-size: .82em;
    font-weight: 400;
    color: var(--ns-dl-muted);
}

.ns-dl-action {
    text-align: right;
    white-space: nowrap;
}

/* Upcoming issues are muted: present, but clearly not yet actionable. */
.ns-dl-row--upcoming .ns-dl-name { color: var(--ns-dl-muted); font-weight: 500; }
.ns-dl-row--upcoming             { background: #fcfcfc; }

.ns-dl-pending {
    font-size: .88em;
    color: var(--ns-dl-muted);
    font-style: normal;
}

/* Primary action — also applies to native WooCommerce downloads, which we
   render inside this table with the same class. */
.ns-downloads-table .ns-dl-btn,
.ns-downloads-table a.woocommerce-button {
    display: inline-block;
    background: var(--ns-dl-grad);
    color: #fff !important;
    border: 0;
    border-radius: 5px;
    padding: 9px 20px;
    font-size: .85em;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ns-downloads-table .ns-dl-btn:hover,
.ns-downloads-table a.woocommerce-button:hover {
    background: var(--ns-dl-grad-hover);
    box-shadow: 0 6px 16px rgba(230, 84, 41, .28);
    transform: translateY(-1px);
    color: #fff !important;
}

.ns-downloads-table .ns-dl-btn:focus-visible,
.ns-downloads-table a.woocommerce-button:focus-visible {
    outline: 2px solid var(--ns-dl-accent);
    outline-offset: 2px;
}

.ns-native-downloads-heading {
    margin: 28px 0 12px;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ns-dl-accent, #ff6b6b);
}

@media (max-width: 520px) {
    .ns-downloads-table td { padding: 12px; }
    .ns-downloads-table tr { display: flex; flex-wrap: wrap; }
    .ns-dl-name, .ns-dl-action { flex: 1 1 100%; }
    .ns-dl-action { text-align: left; padding-top: 0; }
    .ns-dl-name   { padding-bottom: 6px; }
}

/* ── Prenumeraty → link across to the PDF tab ───────────────────────── */

.ns-pdf-tab-notice {
    margin: 0 0 20px;
    font-size: .95em;
    color: #555;
}

.ns-pdf-tab-link {
    font-weight: 700;
    color: #e65429;
    text-decoration: none;
    border-bottom: 1px solid rgba(230, 84, 41, .35);
    transition: color .2s ease, border-color .2s ease;
    white-space: nowrap;
}

.ns-pdf-tab-link:hover,
.ns-pdf-tab-link:focus {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
}

/* Status marker on a published issue inside a subscription card. */
.ns-sub-available {
    font-size: .9em;
    color: #2e7d32;
    font-weight: 600;
}
