/* Subscription Status page — refreshed card layout that still sits inside
 * the legacy Foundation shell. Kept intentionally minimal so existing jQuery
 * selectors (#subscription-*, #cancel-subscription, #subscriptions-manage, etc.)
 * continue to populate the new markup without JS changes.
 *
 * Typography intentionally stays with the legacy Lato stack so it blends with
 * the rest of the app. No font file imports.
 */

#subscription-container-outer {
    margin-left: auto;
    margin-right: auto;
    max-width: 860px;
    padding: 32px 25px 56px;
}

.sub-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a2635;
    margin: 0 0 18px;
    letter-spacing: -0.2px;
}

#subscription-container {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    padding: 26px 28px 22px;
    box-shadow: 0 2px 14px rgba(22, 38, 54, 0.06);
}

/* ---- Head: plan name + pills ---- */
.sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef1f5;
    flex-wrap: wrap;
}
.sub-head__name h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #162233;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.sub-head__desc {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #7d8796;
}
.sub-head__pills {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sub-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f6fb;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    color: #5f6a79;
}
.sub-pill__label { text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; font-weight: 600; }
.sub-pill strong { color: #1a2635; font-weight: 800; text-transform: capitalize; }
.sub-pill--plan { background: #e8f0ff; color: #244ea9; }
.sub-pill--plan strong { color: #244ea9; }
.sub-pill i { font-size: 12px; }

/* ---- Storage usage bar ---- */
.sub-usage {
    padding: 18px 0 10px;
    border-bottom: 1px solid #eef1f5;
}
.sub-usage__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: #5f6a79;
    margin-bottom: 8px;
}
.sub-usage__label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; font-size: 11px; color: #7d8796; }
.sub-usage__value { color: #1a2635; font-size: 14px; }
.sub-usage__value strong { font-weight: 800; }
.sub-usage__sep { color: #9aa3b2; font-weight: 400; margin: 0 4px; }
.sub-usage__bar {
    height: 10px;
    background: #eef1f5;
    border-radius: 999px;
    overflow: hidden;
}
.sub-usage__fill {
    height: 100%;
    background: linear-gradient(90deg, #3ea679 0%, #40c474 100%);
    transition: width 0.3s ease, background 0.2s ease;
    border-radius: 999px;
}
.sub-usage__fill--warn  { background: linear-gradient(90deg, #e2a234 0%, #f5b13d 100%); }
.sub-usage__fill--crit  { background: linear-gradient(90deg, #cf4444 0%, #e55f5f 100%); }

/* ---- Key billing facts ---- */
.sub-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 22px;
    padding: 18px 0;
    border-bottom: 1px solid #eef1f5;
}
.sub-stats__cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sub-stats__label {
    font-size: 11px;
    font-weight: 600;
    color: #7d8796;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sub-stats__label i { color: #9aa3b2; font-size: 13px; }
.sub-stats__value {
    font-size: 14px;
    font-weight: 700;
    color: #1a2635;
    word-break: break-word;
}
.sub-stats__value a { font-weight: 600; color: #2469ff; }
.sub-stats__value .sub-countdown {
    font-weight: 500;
    color: #7d8796;
    font-size: 13px;
    margin-left: 4px;
}

/* ---- Access method cards ---- */
.sub-section-title {
    margin: 22px 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #7d8796;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sub-access__card {
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    padding: 14px 16px 12px;
    margin-bottom: 12px;
    background: #fbfcfd;
}
.sub-access__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}
.sub-access__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e8f0ff;
    color: #2469ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-top: 2px;
}
.sub-access__head > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sub-access__head strong {
    font-size: 14px;
    font-weight: 800;
    color: #1a2635;
    letter-spacing: -0.1px;
}
.sub-access__sub {
    font-size: 12px;
    color: #7d8796;
    line-height: 1.4;
}
.sub-access__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px dashed #edf0f5;
    margin-top: 8px;
}
.sub-access__field {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 13px;
    flex-wrap: wrap;
}
.sub-access__field-label {
    flex-shrink: 0;
    width: 80px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #9aa3b2;
}
.sub-access__field-value {
    color: #1a2635;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}
.sub-access__field-value a { color: #2469ff; text-decoration: underline; }
.sub-access__card code.sub-access__field-value {
    font-family: "SF Mono", Consolas, Menlo, monospace;
    background: #eef1f5;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12.5px;
    color: #1a2635;
}
.sub-access__card--compact .sub-access__sub { display: none; }
.sub-access__card--compact .sub-access__head { margin-bottom: 6px; }
.sub-access__card--compact .sub-access__body { border-top: 0; padding-top: 0; margin-top: 0; }

/* ---- Actions row ---- */
.sub-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 20px;
    margin-top: 14px;
    border-top: 1px solid #eef1f5;
    flex-wrap: wrap;
}
#subscription-container .button.sub-actions__primary {
    margin: 0;
    background: #2469ff;
    color: #fff;
    font-weight: 700;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(36, 105, 255, 0.28);
    width: auto;
}
#subscription-container .button.sub-actions__primary:hover { background: #1a57e0; }
#subscription-container .button.sub-actions__secondary {
    margin: 0;
    background: #ffffff;
    color: #1a2635;
    border: 1px solid #d6dbe4;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    width: auto;
}
#subscription-container .button.sub-actions__secondary:hover {
    background: #f5f7fb;
    border-color: #bac2cf;
}
.sub-actions__cancel {
    margin-left: auto;
    font-size: 13px;
    color: #94a0b1;
    text-decoration: underline;
    cursor: pointer;
}
.sub-actions__cancel:hover { color: #d14343; }

/* ---- Unpaid-debt banner ---- */
.cover-unpaid-div {
    background: #fff4e5;
    border: 1px solid #ffd7a3;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 18px;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cover-unpaid-div p {
    margin: 0;
    color: #8a4b0a;
    font-weight: 600;
}
.cover-unpaid-div p i { margin-right: 8px; color: #d17910; }

/* ---- Responsive ---- */
@media all and (max-width: 700px) {
    #subscription-container-outer { padding: 22px 14px 40px; }
    #subscription-container { padding: 20px 18px 16px; }
    .sub-stats { grid-template-columns: 1fr; gap: 12px; }
    .sub-head { padding-bottom: 14px; }
    .sub-actions { padding-top: 16px; }
    .sub-actions__cancel { margin-left: 0; width: 100%; text-align: center; padding-top: 6px; }
    .sub-access__field-label { width: 70px; }
}

/* Retain legacy subscription-change modal styles (used for fallback only now;
 * payment_overlay.js intercepts the triggers in capture phase). */
.subscription-change-container label { padding: 15px; }
.subscription-change-container span { line-height: 51px; }
.subscription-change-container span.price {
    float: right;
    margin-right: 15px;
    font-weight: bold;
}
.subscription-change-container button { float: right; }
.subscription-change-container img { margin-left: 15px; }
