﻿.root-container {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.title {
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 20px;
    line-height: 150%;
    color: var(--text-secondary);
    margin: 0;
}

.content-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Card plus (mobile defaults) */
.plus-card {
    box-sizing: border-box;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    background: var(--surface-sunken);
}

/* Top container: stacked on mobile */
.plus-card-top-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Info and cost stacked */
.plus-card-top-info-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plus-card-top-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .plus-card-top-titles > p {
        font-family: var(--font-family);
        font-weight: 500;
        font-size: 14px;
        color: var(--text-secondary);
    }

.plus-card-top-title-crown {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

    .plus-card-top-title-crown > p {
        font-family: var(--third-family);
        font-weight: 600;
        font-size: 20px;
        color: var(--accent-action);
    }

.plus-card-top-cost-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .plus-card-top-cost-info > #cost-text {
        font-family: var(--third-family);
        font-weight: 600;
        font-size: 24px;
        color: var(--text-primary);
    }

    .plus-card-top-cost-info > #active-until-text {
        font-family: var(--font-family);
        font-weight: 500;
        font-size: 13px;
        color: var(--text-secondary);
    }

.plus-card-tools-container {
    display: none; /* hidden on mobile */
}

.tools-container-botom {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 28px;
}

/* Subscription action button */
.button-subscription-action[action="renew"] {
}

.button-subscription-action[action="cancel"] {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 0px;
    gap: 10px;
    height: 36px;
    border: none;
    background: none;
    /* Text */
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--red-color);
}

/* TRANSACTIONS */
.transactions-container {
    display: none; /* hidden on mobile */
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.transactions-mobile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
    border-radius: 12px;
    background: var(--green-color);
    border: 1px solid rgba(0,0,0,0.04);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    gap: 8px;
}

.transactions-title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.transactions-title {
    font-family: var(--font-family);
    font-weight: 300;
    font-size: 16px;
    color: #FFFFFF;
    margin: 0;
}

/* Transaction item */
.transaction-item {
    box-sizing: border-box;
    border-radius: 16px;
    padding: 12px;
    min-width: 328px;
    width: 328px;
    height: 84px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    background: var(--surface-raised);
    flex-shrink: 0;
}

.transaction-item-title-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.transaction-item-title {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 140%;
    color: var(--text-primary);
    margin: 0;
}

.transaction-item-sub-titles-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.transaction-item-date {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 13px;
    line-height: 143%;
    color: var(--text-secondary);
    margin: 0;
}

.transaction-item-value {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 150%;
    text-align: right;
    color: var(--text-secondary);
    margin: 0;
}

/* Default-sub container (mobile stacked) */
.content-default-sub-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-self: stretch;
}

.default-to-plus-container {
    box-sizing: border-box;
    display: flex;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    min-height: 100px;
    background: radial-gradient(132.4% 119.64% at 22.76% 25.36%, #58a6ff 0%, #3f3fd3 100%);
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 12px;
}

    .default-to-plus-container > p {
        font-family: var(--third-family);
        font-weight: 600;
        font-size: 20px;
        line-height: 150%;
        text-align: center;
        color: #fff;
    }

/* Features: stacked on mobile */
.content-features-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-container {
    display: flex;
    border-radius: 20px;
    padding: 12px;
    min-height: 180px;
    background: var(--surface-sunken);
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.feature-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-icon-container {
    box-sizing: border-box;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-title {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
}

.feature-description {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.agreement {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px 0px;
    gap: 8px;
    min-height: 32px;
}

input[type="checkbox"].agreement-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 24px;
    height: 24px;
    flex: none;
    order: 0;
    flex-grow: 0;
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    align-self: start;
    transition: all 0.2s;
}

    input[type="checkbox"].agreement-checkbox:checked {
        background-image: url(/images/checkmark.svg);
        background-size: 16px;
        background-position: center;
        background-repeat: no-repeat;
        background-color: var(--accent-action);
        border: 0px solid var(--accent-action);
    }

.agreement-label {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
}

    .agreement-label > a {
        text-decoration: none;
        color: var(--accent-action);
    }


.buy-subscription-button {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .root-container {
        gap: 32px;
    }

    .title {
        font-size: 24px;
        text-align: start;
    }

    .plus-card {
        border-radius: 16px;
        padding: 16px;
        gap: 16px;
    }

    .plus-card-top-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .plus-card-top-info-container {
        gap: 16px;
    }

    .plus-card-top-title-crown > p {
        font-size: 24px;
    }

    .plus-card-tools-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #support-button-bottom {
        display: none;
    }

    .button-subscription-action {
        box-sizing: border-box;
        border: none;
        padding: 8px 0px;
        min-height: 36px;
        height: 36px;
        background: transparent;
        font-family: var(--font-family);
        font-weight: 500;
        font-size: 14px;
        color: var(--text-secondary);
        cursor: pointer;
        border-radius: 8px;
        align-self: flex-end;
    }

    /* Transactions visible on tablet+ */
    .transactions-container {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .transactions-title {
        font-weight: 600;
        color: var(--text-primary);
    }

    /* hide mobile button on tablet+ */
    .transactions-mobile-button {
        display: none;
    }

    /* horizontal collection style container (keeps horizontal list) */
    .transactions-scroll {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding-bottom: 4px;
    }

    .transaction-item {
        min-width: 328px;
        width: 328px;
    }

    .content-default-sub-container {
        flex-direction: row;
        gap: 16px;
    }

    .default-to-plus-container {
        width: 616px;
    }

    .content-features-container {
        flex-direction: row;
    }

    .feature-container {
        min-height: 220px;
        padding: 16px;
        border-radius: 16px;
    }

    .agreement {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 4px 0px;
        gap: 8px;
        height: 32px;
        /* Inside auto layout */
        flex: none;
        flex-grow: 0;
    }

    input[type="checkbox"].agreement-checkbox {
        /* checkbox */
        -webkit-appearance: none;
        -moz-appearance: none;
        width: 24px;
        height: 24px;
        /* Inside auto layout */
        flex: none;
        order: 0;
        flex-grow: 0;
        background-color: transparent;
        border: 2px solid var(--text-secondary);
        border-radius: 6px;
    }

        input[type="checkbox"].agreement-checkbox:checked {
            background-image: url(/images/checkmark.svg);
            background-size: 16px;
            background-position: center;
            background-repeat: no-repeat;
            background-color: var(--accent-action);
            border: 0px solid var(--accent-action);
        }

    .agreement-label {
        font-family: var(--font-family);
        font-weight: 500;
        font-size: 14px;
        line-height: 20px;
        /* identical to box height, or 143% */
        display: flex;
        align-items: center;
        /* light mode/grey 500 */
        color: var(--text-secondary);
        /* Inside auto layout */
        gap: 4px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

        .agreement-label > a {
            text-decoration: none;
            color: var(--accent-action);
        }

    .buy-subscription-button-container {
        max-width: 364px;
    }

    .buy-subscription-button {
        max-width: 364px;
    }

    .tools-container-botom {
        display: none;
    }
}

@media (min-width: 1024px) {
    .title {
        font-size: 24px;
    }

    .plus-card {
        border-radius: 20px;
        padding: 16px;
        gap: 20px;
        background: var(--surface-sunken);
    }

    .plus-card-top-title-crown > p {
        font-size: 24px;
    }

    .plus-card-top-cost-info > #cost-text {
        font-size: 32px;
    }

    .transactions-container {
        gap: 14px;
    }

    .transactions-title {
        font-size: 18px;
    }

    .transaction-item-title {
        font-size: 18px;
    }

    .transaction-item-date {
        font-size: 14px;
    }

    .default-to-plus-container {
        width: 616px;
        border-radius: 20px;
        padding: 20px;
    }

    .feature-container {
        min-height: 248px;
        padding: 16px;
    }
}

.plans-title {
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
    margin: 8px 0 0;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface-raised);
    border: 1px solid var(--surface-sunken);
    border-radius: 16px;
    padding: 20px;
}

.plan-card-recommended {
    border: 2px solid var(--accent-action);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--accent-soft);
    color: var(--text-on-soft);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 8px;
}

.plan-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.plan-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
}

.plan-price {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
}

.plan-limits {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-limit {
    margin: 0;
    font-size: 13px;
    color: var(--ink-500);
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-feature {
    margin: 0;
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.plan-feature-check {
    color: var(--green-500);
    font-weight: 700;
}

.plan-cta {
    margin-top: 4px;
    width: 100%;
}

.plan-cta-current {
    background: var(--ink-500) !important;
}

.plan-cta:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 760px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Equal-height plan cards with the CTA pinned to the bottom */
.plans-grid {
    align-items: stretch;
}

.plan-card {
    height: 100%;
}

.plan-cta {
    margin-top: auto;
}

/* Storage usage indicator */
.storage-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-raised);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.storage-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.storage-card-title {
    font-weight: 600;
    font-size: 15px;
}

.storage-card-value {
    color: var(--ink-500);
    font-size: 14px;
}

.storage-bar {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: rgba(75, 159, 255, 0.15);
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--accent-action);
    transition: width 0.3s ease;
}

/* ===================== Redesigned subscription page ===================== */

.sub-page-title {
    font-family: var(--third-family);
    font-weight: 600;
    font-size: 22px;
    color: var(--text-primary);
    margin: 0;
}

.sub-page-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 2px 0 6px;
}

/* ----- Hero card (active subscription) ----- */
.sub-hero {
    background: var(--surface-raised);
    border: 1px solid var(--surface-sunken);
    border-radius: 14px;
    overflow: hidden;
}

.sub-hero-banner {
    background: var(--accent);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sub-hero-crown {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--on-accent);
}

.sub-hero-titles { flex: 1 1 auto; min-width: 0; }

.sub-hero-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--on-accent);
}

.sub-hero-status {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--on-accent);
    opacity: 0.82;
}

.sub-hero-renew {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.sub-hero-renew-label {
    font-size: 12px;
    color: var(--on-accent);
    opacity: 0.82;
}

.sub-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    background: rgba(255, 255, 255, 0.30);
    flex: 0 0 auto;
}

.sub-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface-raised);
    transition: left 0.15s ease;
}

.sub-switch.on { background: rgba(255, 255, 255, 0.92); }
.sub-switch.on span { left: 23px; background: var(--accent); }

.sub-hero-body { padding: 18px 22px; }

.sub-cap {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.sub-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 18px;
}

.sub-feature {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--text-primary);
}

.sub-check {
    color: var(--accent);
    font-weight: 700;
    flex: 0 0 auto;
    line-height: 1.3;
}

/* ----- Plus -> Pro upsell ----- */
.sub-upsell {
    background: var(--surface-raised);
    border: 2px solid var(--accent);
    border-radius: 14px;
    padding: 18px 22px;
}

.sub-upsell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.sub-upsell-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.sub-upsell-price {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--on-accent);
}

.sub-upsell-cta { margin-top: 16px; }

/* ----- Actions list ----- */
.sub-actions {
    background: var(--surface-raised);
    border: 1px solid var(--surface-sunken);
    border-radius: 14px;
    overflow: hidden;
}

.sub-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.sub-action-row + .sub-action-row { border-top: 1px solid var(--surface-sunken); }
.sub-action-row:hover { background: var(--surface-sunken); }
.sub-action-icon { color: var(--text-secondary); flex: 0 0 auto; }
.sub-action-row span { flex: 1 1 auto; }
.sub-action-arrow { color: var(--text-secondary); flex: 0 0 auto; }

/* ----- Plan comparison (no subscription) ----- */
.sub-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.sub-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface-raised);
    border: 1px solid var(--surface-sunken);
    border-radius: 14px;
    padding: 20px;
}

.sub-plan--rec { border: 2px solid var(--accent); }

.sub-plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--on-accent);
}

.sub-plan-head { display: flex; align-items: center; gap: 8px; }
.sub-plan-crown { color: var(--accent); flex: 0 0 auto; }
.sub-plan-name { font-size: 17px; font-weight: 600; color: var(--text-primary); }

.sub-plan-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2px 0 14px;
}

.sub-plan-limits { margin-bottom: 14px; }
.sub-plan-limits p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.sub-plan-features {
    border-top: 1px solid var(--surface-sunken);
    padding-top: 14px;
    margin-bottom: 14px;
}

.sub-plan-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-primary);
}

.sub-plan-feature.is-head { font-weight: 600; }

.sub-plan-cta {
    margin-top: auto;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: var(--on-accent);
}

.sub-plan-cta.is-current {
    background: var(--surface-sunken);
    color: var(--text-secondary);
    cursor: default;
}

.sub-plan-cta:disabled { cursor: default; }

.sub-consent-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 6px 0 0;
}

.sub-consent-note a { color: var(--accent-action); text-decoration: none; }

@media (max-width: 640px) {
    .sub-feature-grid { grid-template-columns: 1fr; }
    .sub-hero-banner { padding: 16px; }
    .sub-hero-body { padding: 16px; }
    .sub-plans-grid {
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .sub-plan { scroll-snap-align: start; }
}
