/* ============================================================
   Olivapedia Paywall — Front-end Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset / base ─────────────────────────────────────────── */
.opw-teaser-wrap,
.opw-paywall-box,
.opw-account-box,
.opw-subscribe-box {
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* ── Teaser fade ──────────────────────────────────────────── */
.opw-teaser-wrap {
    position: relative;
    max-height: 180px;
    overflow: hidden;
    margin-bottom: 0;
}
.opw-teaser-content {
    line-height: 1.7;
    color: #374151;
}
.opw-paywall-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

/* ── Paywall box ──────────────────────────────────────────── */
.opw-paywall-box {
    margin: 0 auto 2rem;
    max-width: 560px;
}
.opw-paywall-inner {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,.07),
        0 20px 60px -10px rgba(99,102,241,.12);
    position: relative;
    overflow: hidden;
}
.opw-paywall-inner::before {
    content: '';
    position: absolute;
    top: -60px; left: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
    pointer-events: none;
}

.opw-paywall-icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    animation: opw-bounce .8s ease infinite alternate;
}
@keyframes opw-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

.opw-paywall-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 .6rem;
    line-height: 1.25;
}
.opw-paywall-message {
    font-size: .95rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* ── Price display ────────────────────────────────────────── */
.opw-paywall-price {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
}
.opw-price-amount {
    font-size: 2rem;
    font-weight: 800;
}
.opw-price-period {
    font-size: 1rem;
    font-weight: 500;
    -webkit-text-fill-color: #9ca3af;
}

/* ── Benefits list ────────────────────────────────────────── */
.opw-benefits {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    text-align: left;
    display: inline-block;
}
.opw-benefits li {
    font-size: .9rem;
    color: #374151;
    padding: .3rem 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.opw-payment-buttons {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1rem;
}
.opw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.75rem;
    border: none;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.opw-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.opw-btn:active { transform: translateY(0); }
.opw-btn:disabled { opacity: .6; cursor: not-allowed; }

.opw-btn-stripe {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,.4);
}
.opw-btn-stripe svg { fill: #fff; }

.opw-btn-cancel {
    background: #fee2e2;
    color: #b91c1c;
    margin-top: .75rem;
}
.opw-btn-cancel:hover { background: #fecaca; }

/* ── Login hint ───────────────────────────────────────────── */
.opw-login-hint,
.opw-subscription-manage {
    font-size: .85rem;
    color: #9ca3af;
    margin-top: .5rem;
}
.opw-login-hint a,
.opw-subscription-manage a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

/* ── Feedback message ─────────────────────────────────────── */
.opw-payment-message {
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
}
.opw-payment-message.success {
    background: #d1fae5;
    color: #065f46;
}
.opw-payment-message.error {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ── Account box ──────────────────────────────────────────── */
.opw-account-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    max-width: 560px;
    margin: 1.5rem auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.opw-account-box h2 {
    margin-top: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
}
.opw-account-status { margin-top: 1rem; }

/* ── Badges ───────────────────────────────────────────────── */
.opw-badge {
    display: inline-block;
    padding: .3rem .85rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .75rem;
}
.opw-badge-active   { background: #d1fae5; color: #065f46; }
.opw-badge-inactive,
.opw-badge-cancelled { background: #f3f4f6; color: #6b7280; }
.opw-badge-pending  { background: #fef3c7; color: #92400e; }

/* ── PayPal button container ──────────────────────────────── */
#opw-paypal-btn-container {
    min-height: 48px;
    border-radius: 50px;
    overflow: hidden;
}

/* ── Loading spinner ──────────────────────────────────────── */
.opw-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: opw-spin .6s linear infinite;
    vertical-align: middle;
    margin-right: .5rem;
}
@keyframes opw-spin { to { transform: rotate(360deg); } }

/* ── Subscribe box ────────────────────────────────────────── */
.opw-subscribe-box {
    text-align: center;
    padding: 1.5rem;
}
