/* ── Profeat Subscription & Referral Tabs ─────────────── */

.profeat-subscription-tab,
.profeat-referral-tab {
    max-width: 640px;
}

/* Title */
.profeat-sub-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 1.2rem;
}

.profeat-sub-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 0.8rem;
}

/* Card */
.profeat-sub-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
}

/* Row: label + value */
.profeat-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.profeat-sub-row + .profeat-sub-row {
    border-top: 1px solid #2a2a3e;
}

.profeat-sub-label {
    font-size: 0.9rem;
    color: #888;
}

.profeat-sub-value {
    font-size: 0.95rem;
    color: #e0e0e0;
    font-weight: 500;
}

/* Status badges */
.profeat-sub-status--active {
    color: #4ade80;
}

.profeat-sub-status--expired,
.profeat-sub-status--inactive,
.profeat-sub-status--unsubscribed {
    color: #f87171;
}

.profeat-sub-status--pending,
.profeat-sub-status--activation_required {
    color: #fbbf24;
}

/* Actions */
.profeat-sub-actions {
    margin-top: 1rem;
}

.profeat-sub-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ── Buttons ──────────────────────────────────────────── */

.profeat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
}

.profeat-btn--primary {
    background: var(--pf-accent-primary, #7031ed);
    color: #fff;
    padding: 0.7rem 1.6rem;
}

.profeat-btn--primary:hover {
    background: var(--pf-accent-hover, #7a34e0);
}

.profeat-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profeat-btn--small {
    background: var(--pf-accent-primary, #7031ed);
    color: #fff;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.profeat-btn--small:hover {
    background: var(--pf-accent-hover, #7a34e0);
}

/* ── Referral-specific ────────────────────────────────── */

.profeat-ref-code {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: #a78bfa;
}

.profeat-ref-link-wrap {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.profeat-ref-link-input {
    flex: 1;
    background: #151525;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #ccc;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    outline: none;
}

.profeat-ref-link-input:focus {
    border-color: var(--pf-accent-primary, #7031ed);
}

/* Share buttons */
.profeat-ref-share {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profeat-ref-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.profeat-btn--share {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
    color: #fff;
}

.profeat-btn--whatsapp {
    background: #25d366;
}

.profeat-btn--whatsapp:hover {
    background: #1da851;
}

.profeat-btn--sms {
    background: #3b82f6;
}

.profeat-btn--sms:hover {
    background: #2563eb;
}

.profeat-btn--email {
    background: #6366f1;
}

.profeat-btn--email:hover {
    background: #4f46e5;
}

/* Referral table */
.profeat-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.profeat-ref-table th {
    text-align: left;
    color: #888;
    font-weight: 500;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid #2a2a3e;
}

.profeat-ref-table td {
    padding: 0.6rem 0.4rem;
    color: #ccc;
    border-bottom: 1px solid #1a1a2e;
}

.profeat-ref-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.profeat-ref-status--pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.profeat-ref-status--completed {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}

/* ── Billing dashboard (inline Stripe data) ───────────── */

.profeat-billing-loader {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #888;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

.profeat-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-top-color: var(--pf-accent-primary, #7031ed);
    border-radius: 50%;
    animation: profeat-spin 0.6s linear infinite;
}

@keyframes profeat-spin {
    to { transform: rotate(360deg); }
}

body.page-id-319 .profeat-core-checkout,
.profeat-core-checkout {
    width: 100%;
}

body.page-id-319 .profeat-core-checkout-unavailable,
.profeat-core-checkout-unavailable {
    align-items: center;
    background: rgba(112, 49, 237, 0.08);
    border: 1px solid rgba(112, 49, 237, 0.22);
    border-radius: 8px;
    color: #e0d8ff;
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: 1.35;
    min-height: 54px;
    padding: 10px 12px;
    text-align: center;
    width: 100%;
}

body.page-id-319 .profeat-core-checkout-unavailable span,
.profeat-core-checkout-unavailable span {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

body.page-id-319 .profeat-core-checkout-unavailable small,
.profeat-core-checkout-unavailable small {
    color: #a9a1bd;
    font-size: 0.74rem;
}

body.page-id-319 .profeat-core-checkout__options,
.profeat-core-checkout__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

body.page-id-319 .profeat-core-checkout__form,
.profeat-core-checkout__form {
    margin: 0;
}

body.page-id-319 .profeat-core-checkout__button,
.profeat-core-checkout__button {
    align-items: center;
    background: #7031ed;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 0 10px;
    text-transform: uppercase;
    width: 100%;
}

body.page-id-319 .profeat-core-checkout__button:hover,
body.page-id-319 .profeat-core-checkout__button:focus-visible,
.profeat-core-checkout__button:hover,
.profeat-core-checkout__button:focus-visible {
    background: #5f27d8;
}

body.page-id-319 .profeat-core-checkout__button.is-disabled,
.profeat-core-checkout__button.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

body.page-id-319 .profeat-core-checkout__hint,
.profeat-core-checkout__hint {
    color: #8f8f9a;
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 10px 0 0;
}

.profeat-billing-plan {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.6rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #2a2a3e;
}

.profeat-billing-plan-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
}

.profeat-billing-plan-price {
    font-size: 1rem;
    color: #a78bfa;
    font-weight: 600;
}

.profeat-billing-pm {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.profeat-billing-pm-brand {
    background: #2a2a3e;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #e0e0e0;
    text-transform: capitalize;
}

.profeat-billing-pm-details {
    color: #ccc;
    font-size: 0.9rem;
}

.profeat-billing-notice {
    margin-top: 0.6rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.profeat-billing-notice--warn {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.profeat-billing-actions {
    margin-top: 1.2rem;
}

.profeat-btn--outline {
    background: transparent;
    border: 1px solid var(--pf-accent-primary, #7031ed);
    color: var(--pf-accent-primary, #7031ed);
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.profeat-btn--outline:hover {
    background: rgba(var(--pf-accent-hover-rgb, 122, 52, 224), 0.1);
    border-color: var(--pf-accent-hover, #7a34e0);
    color: #fff;
}

.profeat-btn--tiny {
    background: #2a2a3e;
    color: #ccc;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.profeat-btn--tiny:hover {
    background: #3a3a4e;
    color: #fff;
}

.profeat-invoice-table td:last-child {
    text-align: right;
}

/* ── Soft paywall modal ─────────────────────────────────── */

body.profeat-paywall-open {
    overflow: hidden;
}

.profeat-paywall-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.profeat-paywall-modal.is-visible {
    display: flex;
}

.profeat-paywall-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(7px);
}

.profeat-paywall-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #101017;
    color: #f4f1ff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.profeat-paywall-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.profeat-paywall-modal h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding-right: 48px;
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.12;
}

.profeat-paywall-modal__logo {
    display: block;
    width: 124px;
    max-width: min(42%, 160px);
    height: auto;
}

.profeat-paywall-modal__logo[hidden] {
    display: none;
}

.profeat-paywall-modal__body {
    margin: 14px 0 0;
    color: #bbb6cc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.profeat-paywall-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.profeat-paywall-modal__cta,
.profeat-paywall-modal__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.profeat-paywall-modal__cta {
    border: 1px solid #7031ed;
    background: #7031ed;
    color: #fff;
}

.profeat-paywall-modal__secondary {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #d8d2ea;
    cursor: pointer;
}

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

@media (max-width: 600px) {
    .profeat-sub-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .profeat-ref-link-wrap {
        flex-direction: column;
    }

    .profeat-ref-share-buttons {
        flex-direction: column;
    }

    .profeat-btn--share {
        text-align: center;
    }
}
