/* =========================================================================
   Exhale Space — Subscription Plugin Styles
   ========================================================================= */

/* ---- Filter Tabs ---- */
.es-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.es-tab {
    padding: 10px 24px;
    background: #f0f4f1;
    border: 2px solid transparent;
    border-radius: 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #2D6A4F;
    transition: background 0.2s, border-color 0.2s;
}

.es-tab:hover {
    background: #d8ede3;
}

.es-tab--active {
    background: #2D6A4F;
    color: #fff;
    border-color: #2D6A4F;
}

/* ---- Plans Panel ---- */
.es-plans-panel {
    display: none;
}

.es-plans-panel--active {
    display: block;
}

.es-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ---- Plan Card ---- */
.es-plan-card {
    border: 1px solid #e0e8e3;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow 0.2s;
}

.es-plan-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}

.es-plan-card__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.es-plan-card__body {
    padding: 20px;
    flex: 1;
}

.es-plan-card__name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a3c2d;
}

.es-plan-card__desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.es-plan-card__price {
    margin-top: 16px;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.es-plan-card__amount {
    font-size: 28px;
    font-weight: 800;
    color: #2D6A4F;
}

.es-plan-card__amount,
.es-plan-card__price ins {
    text-decoration: none;
}

.es-plan-card__regular {
    font-size: 18px;
    font-weight: 500;
    color: #999;
    text-decoration: line-through;
}

.es-plan-card__interval {
    font-size: 14px;
    color: #777;
}

.es-plan-card__footer {
    padding: 0 20px 20px;
}

/* ---- Subscribe Button ---- */
.es-subscribe-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    background: #2D6A4F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.es-subscribe-btn:hover {
    background: #1e4d38;
    color: #fff;
}

.es-subscribe-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.es-subscribe-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
    min-height: 18px;
}

.es-subscribe-msg--success {
    color: #2D6A4F;
    font-weight: 600;
}

/* Checkout toast notifications */
.es-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.es-toast {
    padding: 0.9rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: 0 12px 32px rgba(61, 56, 53, 0.18);
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.es-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.es-toast--success {
    background: #2D6A4F;
    color: #fff;
    font-weight: 600;
}

.es-toast--error {
    background: #fff;
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.25);
}

.es-toast--info {
    background: #fff;
    color: #3d3835;
    border: 1px solid rgba(61, 56, 53, 0.12);
}

@media (max-width: 640px) {
    .es-toast-container {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* ---- Status Badges ---- */
.es-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.es-status--active             { background: #d4edda; color: #155724; }
.es-status--pending            { background: #fff3cd; color: #856404; }
.es-status--pending_cancellation { background: #fde8d8; color: #8a4a00; }
.es-status--cancelled          { background: #f8d7da; color: #721c24; }
.es-status--past_due           { background: #f5c6cb; color: #721c24; }
.es-status--paused             { background: #e2e3e5; color: #383d41; }
.es-status--completed          { background: #cce5ff; color: #004085; }

/* ---- My Account Subscription Detail ---- */
.es-account-sub {
    border: 1px solid #e0e8e3;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.es-account-sub h3 {
    margin-top: 0;
}

.es-payment-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.es-payment-history th,
.es-payment-history td {
    padding: 8px 12px;
    border: 1px solid #eee;
    text-align: left;
}

.es-payment-history th {
    background: #f5f5f5;
    font-weight: 600;
}

/* ---- Guest Portal ---- */
.es-guest-portal {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
}

.es-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.es-btn--danger {
    background: #dc3545;
    color: #fff;
    margin-top: 16px;
}

.es-btn--danger:disabled {
    opacity: 0.6;
}

.es-error {
    color: #721c24;
}

/* ---- Cancel Button ---- */
.es-cancel-btn {
    margin-top: 12px;
}

.es-cancel-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

/* ---- Live Classes (My Account) ---- */
.es-live-class-card--unlocked {
    border-color: #2D6A4F;
}

.es-live-class-card--locked {
    opacity: 0.7;
}

.es-live-class-join {
    background: #2D6A4F;
    color: #fff;
}
