/* Order Summary card — unified pricing + add-on selection block rendered by
   _PricingPanel.cshtml (with _AddOnPanel.cshtml nested inside) on the activation
   and refill submit forms. Replaces the prior split bordered-card + inline
   rule-bounded summary with a single cohesive card. The dual-totals footer is
   the visual anchor: two equal-weight cells side by side, "Customer pays"
   (neutral) and "Charged to your account" (brand-green, the dealer's debit). */

/* ── Outer card ── */
.summary-card {
    border: 1px solid #d1d5db;
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    margin: 1.25rem 0;
}

.summary-card-header {
    background: #111827;
    color: #f9fafb;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-card-clear {
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 0.85rem;
    padding: 0.1rem 0.3rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.15rem;
}

.summary-card-clear:hover {
    color: #fff;
}

/* ── Sections ── */
.summary-section {
    padding: 1rem 1.25rem;
}

.summary-section + .summary-section {
    border-top: 1px solid #e5e7eb;
}

.summary-section-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

/* ── Plan line ── */
.summary-card .pricing-line-plan {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.98rem;
}

.summary-card .plan-line-name {
    font-weight: 600;
}

.summary-card .pricing-line-rate {
    color: #6b7280;
    font-size: 0.84rem;
    margin-left: 0.4rem;
}

/* ── Dynamic addon subtotal lines (running breakdown between addons and totals).
   Hidden by JS when no add-ons are selected. Preserved as .pricing-line-addon
   so the Playwright contract (RefillMobileXAddOnLivePreviewTests) still matches. */
.summary-card .pricing-line-items-section {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.summary-card .pricing-line-addon {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 0.18rem 0;
}

/* ── Add-on subgroups (inside the Add-ons section) ── */
.addon-subgroup {
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
}

.addon-subgroup:last-child {
    margin-bottom: 0;
}

.addon-subgroup-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding: 0;
    width: auto;
    float: none;
    display: block;
}

.addon-subgroup-hint {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 0.35rem;
}

.addon-subgroup .form-check {
    margin-bottom: 0.3rem;
    padding-left: 1.75rem;
}

.addon-subgroup .form-check-label.addon-none-label {
    color: #9ca3af;
}

.addon-amount {
    color: #6b7280;
    font-size: 0.88rem;
    margin-left: 0.2rem;
}

/* ── Dual-totals footer ── */
.totals-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.totals-cell {
    padding: 1rem 1.25rem;
    text-align: center;
    background: #fff;
}

.totals-cell .totals-label,
.totals-cell .pricing-totals-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.totals-cell .totals-amount,
.totals-cell .pricing-totals-amount {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.totals-cell .totals-sub {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.4rem;
    font-weight: 400;
}

/* Customer-pays cell — neutral, secondary */
.totals-cell.customer {
    background: #f9fafb;
}

.totals-cell.customer .pricing-totals-label {
    color: #4b5563;
}

.totals-cell.customer .pricing-totals-amount {
    color: #1f2937;
}

/* Dealer-debit cell — brand-green, the dominant total */
.totals-cell.dealer {
    background: linear-gradient(180deg, #f0fdf4, #dcfce7);
}

.totals-cell.dealer .pricing-totals-label {
    color: #166534;
}

.totals-cell.dealer .pricing-totals-amount {
    color: #14532d;
    font-weight: 800;
    font-size: 2rem;
}

.totals-cell.dealer .totals-sub {
    color: #4d7c0f;
}
