/**
 * ParasiteHelpGuide Paywall & Membership – Front-end Styles
 *
 * All classes are scoped to the phg- prefix to avoid conflicts.
 * No jQuery dependency.
 */

/* ──────────────── Paywall Wrapper ──────────────── */

.phg-paywall-wrapper {
    position: relative;
    margin: 1.5em 0;
}

/* Unlocked content – no special styling needed */
.phg-unlocked-content {
    /* Intentionally minimal – content renders normally */
}

/* ──────────────── Blur Container ──────────────── */

.phg-blur-container {
    position: relative;
    overflow: hidden;
    max-height: 300px;
}

.phg-blur-content {
    filter: blur(6px);
    -webkit-filter: blur(6px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    overflow: hidden;
    line-height: 1.7;
}

.phg-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.95) 80%,
        rgba(255, 255, 255, 1) 100%
    );
    pointer-events: none;
}

/* ──────────────── CTA Box ──────────────── */

.phg-cta-box {
    background: #fff;
    border: 2px solid var(--phg-cta-color, #e67e22);
    border-radius: 8px;
    padding: 30px 24px;
    margin: 1em 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.phg-cta-inner {
    max-width: 500px;
    margin: 0 auto;
}

.phg-cta-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.phg-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.phg-cta-button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.phg-cta-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.phg-cta-button:active {
    transform: translateY(0);
}

.phg-cta-subscribe {
    /* Background colour set inline via the setting */
}

.phg-cta-login {
    background: transparent !important;
    color: #666 !important;
    border: 2px solid #ddd !important;
}

.phg-cta-login:hover {
    border-color: #999 !important;
    color: #333 !important;
}

.phg-cta-price {
    margin-top: 12px;
    font-size: 14px;
    color: #888;
}

/* ──────────────── Upgrade CTA ──────────────── */

.phg-upgrade-cta {
    border-style: dashed;
}

/* ──────────────── Account Page ──────────────── */

.phg-account {
    max-width: 800px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.phg-account-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #23282d;
}

/* ── Account Card ── */

.phg-account-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.phg-account-table {
    width: 100%;
    border-collapse: collapse;
}

.phg-account-table th {
    text-align: left;
    padding: 12px 16px 12px 0;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    width: 160px;
}

.phg-account-table td {
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid #eee;
    color: #23282d;
}

.phg-account-table tr:last-child th,
.phg-account-table tr:last-child td {
    border-bottom: none;
}

/* ── Status Badges ── */

.phg-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.phg-status-active {
    background: #d4edda;
    color: #155724;
}

.phg-status-expired {
    background: #fff3cd;
    color: #856404;
}

.phg-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.phg-status-pending {
    background: #e2e3e5;
    color: #383d41;
}

/* ── Cancel Button ── */

.phg-account-cancel {
    margin-top: 20px;
    text-align: right;
}

.phg-cancel-button {
    background: #fff;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.phg-cancel-button:hover {
    background: #dc3545;
    color: #fff;
}

/* ── Account Notices ── */

.phg-account-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.phg-notice-expired {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.phg-notice-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Login Prompt ── */

.phg-login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.phg-login-prompt p {
    font-size: 16px;
    margin-bottom: 24px;
    color: #555;
}

.phg-login-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.phg-login-buttons .phg-cta-button {
    min-width: 140px;
    text-align: center;
}

.phg-cta-register {
    background: #28a745 !important;
    color: #fff !important;
}

/* ──────────────── Tiers Grid ──────────────── */

.phg-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.phg-tier-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.phg-tier-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.phg-tier-featured {
    border-color: #e67e22;
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.15);
}

.phg-tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e67e22;
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phg-tier-name {
    font-size: 20px;
    font-weight: 700;
    color: #23282d;
    margin-bottom: 16px;
}

.phg-tier-price {
    margin-bottom: 16px;
}

.phg-price-amount {
    font-size: 36px;
    font-weight: 800;
    color: #23282d;
}

.phg-price-currency {
    font-size: 16px;
    color: #666;
    margin-left: 4px;
}

.phg-price-cycle {
    font-size: 14px;
    color: #888;
}

.phg-price-free {
    font-size: 36px;
    font-weight: 800;
    color: #28a745;
}

.phg-tier-features p {
    font-size: 14px;
    color: #555;
    margin: 6px 0;
}

.phg-tier-action {
    margin-top: 20px;
}

.phg-paypal-form {
    margin: 0;
}

.phg-paypal-button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.phg-paypal-button:hover {
    opacity: 0.9;
}

/* ──────────────── Responsive ──────────────── */

@media (max-width: 600px) {
    .phg-cta-buttons {
        flex-direction: column;
    }

    .phg-cta-button {
        width: 100%;
        text-align: center;
    }

    .phg-tiers-grid {
        grid-template-columns: 1fr;
    }

    .phg-account-table th {
        width: auto;
    }

    .phg-account-table,
    .phg-account-table tbody,
    .phg-account-table th,
    .phg-account-table td,
    .phg-account-table tr {
        display: block;
    }

    .phg-account-table tr {
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }

    .phg-account-table td {
        padding-left: 0;
    }
}
