/* Times Premium Paywall — paywall.css */

/* ============================================================
   Gate wrapper
   ============================================================ */
.toe-gate {
    position: relative;
    overflow: hidden;
    margin: 24px 0;
}

.toe-teaser {
    margin: 0;
    line-height: 1.7;
}

.toe-gate__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--toe-bg, #fff));
    pointer-events: none;
    z-index: 1;
}

.toe-gate__box {
    position: relative;
    z-index: 2;
    background: var(--toe-box-bg, #fff);
    border: 1px solid var(--toe-border, #e0e0e0);
    border-radius: 8px;
    padding: 28px 24px 24px;
    margin-top: -40px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    text-align: center;
    font-family: inherit;
}

.toe-gate__badge {
    display: inline-block;
    font-size: .75em;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.toe-gate__badge--premium {
    background: #c0392b;
    color: #fff;
}

.toe-gate__badge--registered {
    background: #2c3e50;
    color: #fff;
}

.toe-gate__heading {
    margin: 0 0 8px;
    font-size: 1.25em;
    color: var(--toe-heading, #1a1a1a);
    line-height: 1.3;
}

.toe-gate__sub {
    margin: 0 0 20px;
    color: var(--toe-muted, #666);
    font-size: .95em;
}

.toe-gate__auth-links {
    margin-top: 16px;
    font-size: .9em;
    color: var(--toe-muted, #666);
}

.toe-gate__auth-links--centered {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.toe-gate__logged-in {
    font-size: .9em;
    color: var(--toe-muted, #666);
}

.toe-gate__upgrade {
    margin-top: 14px;
    font-size: .85em;
    color: var(--toe-muted, #666);
}

.toe-gate__upgrade a {
    color: #c0392b;
    text-decoration: none;
}

/* ============================================================
   Plans table
   ============================================================ */
.toe-plans {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0 0;
}

.toe-plan {
    flex: 1 1 90px;
    max-width: 120px;
    border: 1px solid var(--toe-border, #e0e0e0);
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
}

.toe-plan--highlight {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192,57,43,.15);
}

.toe-plan__label {
    font-weight: 700;
    font-size: .85em;
    color: var(--toe-heading, #1a1a1a);
    margin-bottom: 2px;
}

.toe-plan__sub {
    font-size: .7em;
    color: #c0392b;
    font-weight: 600;
    margin-bottom: 4px;
    min-height: 14px;
}

.toe-plan__price {
    font-size: 1em;
    font-weight: 700;
    color: var(--toe-heading, #1a1a1a);
    margin-bottom: 8px;
}

.toe-plan__btn {
    display: block;
    background: #c0392b;
    color: #fff !important;
    border-radius: 4px;
    padding: 6px 4px;
    font-size: .78em;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}

.toe-plan__btn:hover {
    background: #a93226;
    color: #fff !important;
}

.toe-plan__unavailable {
    font-size: .75em;
    color: var(--toe-muted, #999);
}

/* ============================================================
   Buttons
   ============================================================ */
.toe-btn {
    display: inline-block;
    background: #c0392b;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: .95em;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.toe-btn:hover {
    background: #a93226;
}

.toe-btn--outline {
    background: transparent;
    color: #c0392b !important;
    border: 2px solid #c0392b;
}

.toe-btn--outline:hover {
    background: rgba(192,57,43,.05);
}

.toe-btn--full {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* ============================================================
   OTP modal
   ============================================================ */
.toe-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toe-modal[hidden] {
    display: none;
}

.toe-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.toe-modal__box {
    position: relative;
    background: var(--toe-box-bg, #fff);
    border-radius: 10px;
    padding: 32px 28px;
    max-width: 420px;
    width: calc(100% - 32px);
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
    z-index: 1;
}

.toe-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    color: var(--toe-muted, #999);
    padding: 4px 8px;
}

.toe-modal__heading {
    margin: 0 0 8px;
    font-size: 1.2em;
    color: var(--toe-heading, #1a1a1a);
}

.toe-modal__sub {
    margin: 0 0 18px;
    color: var(--toe-muted, #666);
    font-size: .9em;
}

.toe-modal__input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--toe-border, #ccc);
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    margin-bottom: 12px;
    background: var(--toe-input-bg, #fff);
    color: var(--toe-heading, #1a1a1a);
}

.toe-modal__error {
    color: #c0392b;
    font-size: .85em;
    min-height: 18px;
    margin: 0 0 8px;
}

.toe-modal__terms {
    margin-top: 10px;
    font-size: .78em;
    color: var(--toe-muted, #999);
    text-align: center;
}

.toe-modal__terms a {
    color: #c0392b;
}

.toe-modal__resend {
    margin-top: 14px;
    font-size: .85em;
    text-align: center;
    color: var(--toe-muted, #666);
}

.toe-modal__resend a {
    color: #c0392b;
    text-decoration: none;
}

.toe-modal__success {
    font-size: 3em;
    color: #27ae60;
    text-align: center;
    margin-bottom: 8px;
}

/* Digit inputs */
.toe-otp-digits {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.toe-otp-digit {
    flex: 1;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    border: 2px solid var(--toe-border, #ccc);
    border-radius: 6px;
    padding: 10px 0;
    background: var(--toe-input-bg, #fff);
    color: var(--toe-heading, #1a1a1a);
    width: 0; /* flex handles width */
    transition: border-color .15s;
}

.toe-otp-digit:focus {
    outline: none;
    border-color: #c0392b;
}

/* ============================================================
   Badges on article titles
   ============================================================ */
.toe-badge {
    display: inline-block;
    font-size: .5em;
    vertical-align: middle;
    border-radius: 3px;
    padding: 1px 5px;
    font-style: normal;
    line-height: 1.6;
}

.toe-badge--premium {
    background: #c0392b;
    color: #fff;
}

.toe-badge--registered {
    background: #2c3e50;
    color: #fff;
}

/* ============================================================
   Dark mode
   ============================================================ */
.toe-gate.toe-dark,
.toe-modal__box.toe-dark {
    --toe-bg:       #1a1a1a;
    --toe-box-bg:   #252525;
    --toe-border:   #3a3a3a;
    --toe-heading:  #f0f0f0;
    --toe-muted:    #aaa;
    --toe-input-bg: #2d2d2d;
}

.toe-gate.toe-dark .toe-gate__overlay {
    background: linear-gradient(to bottom, transparent, #252525);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
    .toe-plans {
        gap: 6px;
    }
    .toe-plan {
        flex: 1 1 70px;
        padding: 10px 6px;
    }
    .toe-gate__box {
        padding: 20px 14px;
    }
    .toe-modal__box {
        padding: 24px 16px;
    }
}
