/* Meal prep subscription pages (subscribe.html, manage-subscription.html). Builds on menu-cards.css. */

.sub-wrap {
    max-width: 1000px;
    margin: 0 auto;
}

.sub-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 500;
}

    .sub-step-title .step-num {
        margin: 0;
    }

/* Plan type tabs */
.sub-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.sub-tab {
    border: 1px solid var(--rnb-brown);
    color: var(--rnb-brown);
    padding: 9px 24px;
    border-radius: 999px;
    cursor: pointer;
    background: #fff;
    font-weight: 500;
    transition: background-color .2s, color .2s;
}

    .sub-tab.active {
        background: var(--rnb-brown);
        color: #fff;
    }

.sub-tab-note {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 26px;
}

/* Plan cards */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.plan-card {
    border: 2px solid rgb(148 163 184 / 0.35);
    border-radius: 0.9rem;
    padding: 24px 16px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

    .plan-card:hover {
        box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    }

    .plan-card.selected {
        border-color: var(--rnb-brown);
        background: rgb(126 61 46 / 0.05);
    }

    .plan-card .plan-meals {
        font-size: 36px;
        font-weight: 700;
        line-height: 1;
        color: var(--rnb-brown);
    }

    .plan-card .plan-unit {
        color: #94a3b8;
        font-size: 14px;
        margin-bottom: 14px;
    }

    .plan-card .plan-price {
        font-size: 22px;
        font-weight: 600;
    }

    .plan-card .plan-line {
        font-size: 13px;
        color: #64748b;
        margin-top: 4px;
    }

    .plan-card .plan-choose {
        margin-top: 16px;
        display: inline-block;
        padding: 7px 18px;
        border-radius: 6px;
        background: #f59e0b;
        color: #fff;
        font-size: 14px;
    }

    .plan-card.selected .plan-choose {
        background: var(--rnb-brown);
    }

/* Meal picker */
.pick-counter {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
}

    .pick-counter span {
        color: var(--rnb-brown);
        font-weight: 700;
    }

    .pick-counter.over span {
        color: #dc2626;
    }

.menu-card.picked {
    border-color: var(--rnb-brown);
    box-shadow: 0 0 0 2px rgb(126 61 46 / 0.25);
}

.menu-card .pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Form */
.sub-form {
    max-width: 760px;
    margin: 0 auto;
}

.sub-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

    .sub-form-grid .full {
        grid-column: 1 / -1;
    }

.sub-form label.lbl {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.sub-form input[type="text"],
.sub-form input[type="email"],
.sub-form input[type="tel"],
.sub-form input[type="date"],
.sub-form select,
.sub-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    background: #fff;
    font-size: 15px;
}

    .sub-form input:focus,
    .sub-form select:focus,
    .sub-form textarea:focus {
        outline: none;
        border-color: var(--rnb-brown);
        box-shadow: 0 0 0 3px rgb(126 61 46 / 0.14);
    }

.sub-form .radio-row label {
    margin-right: 22px;
    cursor: pointer;
}

.sub-form .hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.sub-summary {
    border: 1px solid rgb(245 158 11 / 0.4);
    background: rgb(245 158 11 / 0.08);
    border-radius: 0.7rem;
    padding: 18px 20px;
    margin: 22px 0;
}

    .sub-summary .row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 4px 0;
    }

    .sub-summary .total {
        border-top: 1px dashed rgb(245 158 11 / 0.6);
        margin-top: 6px;
        padding-top: 8px;
        font-weight: 700;
        font-size: 18px;
        color: var(--rnb-brown);
    }

.sub-submit {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--rnb-brown);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

    .sub-submit:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

/* Confirmation / manage */
.sub-card {
    border: 1px solid rgb(148 163 184 / 0.35);
    border-radius: 0.9rem;
    background: #fff;
    padding: 22px 24px;
    margin-bottom: 20px;
}

    .sub-card h6 {
        font-weight: 600;
        margin-bottom: 10px;
    }

.sub-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px 24px;
}

    .sub-meta span {
        display: block;
        font-size: 12px;
        color: #94a3b8;
    }

    .sub-meta strong {
        font-weight: 600;
    }

.sched-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

    .sched-table th {
        text-align: left;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #94a3b8;
        padding: 8px 6px;
        border-bottom: 1px solid #e2e8f0;
    }

    .sched-table td {
        padding: 10px 6px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

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

.state-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

    .state-pill.upcoming, .state-pill.active {
        background: #ecfdf3;
        color: #15803d;
    }

    .state-pill.skipped, .state-pill.paused {
        background: #fffbeb;
        color: #b45309;
    }

    .state-pill.cancelled {
        background: #fef2f2;
        color: #b91c1c;
    }

.btn-sm {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--rnb-brown);
    color: var(--rnb-brown);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

    .btn-sm:hover {
        background: var(--rnb-brown);
        color: #fff;
    }

    .btn-sm.danger {
        border-color: #dc2626;
        color: #dc2626;
    }

        .btn-sm.danger:hover {
            background: #dc2626;
            color: #fff;
        }

    .btn-sm.solid {
        background: var(--rnb-brown);
        color: #fff;
    }

.manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 640px) {
    .sub-form-grid {
        grid-template-columns: 1fr;
    }

    .sched-table th:nth-child(3),
    .sched-table td:nth-child(3) {
        display: none;
    }
}

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rnb-brown);
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
