/* ---- Lease card step ----
   #ModalLeaseCard (product page) and /Lease/Card share Views/Lease/_LeaseCardPanel.cshtml, so the
   panel is styled once, by class. Plain CSS like the other pages (Tailwind is only for the home
   revamp); the colours are the site's: #4285F4 blue, #191919 text, #6b7280 muted, #e8edf2 lines.
   Logical properties (inline-start/end) so the Arabic layout mirrors without extra rules. */

.lease-card {
    color: #191919;
    font-size: 0.95rem;
}

.lease-card p {
    margin: 0 0 12px;
}

.lease-card-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

.lease-card-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 140px;
}

.lease-card-spinner {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border: 3px solid #e8edf2;
    border-top-color: #4285F4;
    border-radius: 50%;
    animation: leaseCardSpin 0.8s linear infinite;
}

@keyframes leaseCardSpin {
    to { transform: rotate(360deg); }
}

.lease-card-label {
    font-weight: 600;
}

/* "Visa ****4242" - brand and last four only (D4). */
.lease-card-masked {
    border: 1px solid #e8edf2;
    border-radius: 8px;
    background: #F7F7F7;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* The fee has to be read before Submit, so it is set apart rather than small print. */
.lease-card-disclosure {
    border-inline-start: 3px solid #4285F4;
    background: #f3f7fe;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.lease-card-note {
    border-inline-start: 3px solid #d97706;
    background: #fef3c7;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.lease-card-result-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.lease-card-banner {
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.lease-card-banner-success { background: #ecfdf3; border-color: #b7ebc6; color: #1e6b36; }
.lease-card-banner-info    { background: #f3f7fe; border-color: #c9dafb; color: #1f4e9e; }
.lease-card-banner-warning { background: #fef3c7; border-color: #f6d88a; color: #8a5300; }
.lease-card-banner-danger  { background: #fdecec; border-color: #f5c2c2; color: #a12626; }

.lease-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

/* Store badges on the "message" state's app-card look (filled by footer-apps.js, same box as
   Shop/Unavailable's apponly card - D2, 2026-10-01). */
.lease-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 4px 0;
}

.lease-card-badges img {
    height: 44px;
    width: auto;
}

.lease-card-btn {
    flex: 1 1 160px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #4285F4;
    border-radius: 6px;
    background: #4285F4;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .lease-card-btn:hover {
        color: #fff;
        background: #2f73e0;
    }

.lease-card-btn-secondary {
    background: #fff;
    color: #4285F4;
}

    .lease-card-btn-secondary:hover {
        background: #f3f7fe;
        color: #4285F4;
    }

.lease-card-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Declining is one quiet step away from the buttons, never next to Submit. */
.lease-card-cancel {
    display: block;
    margin: 18px auto 0;
    padding: 4px 8px;
    border: 0;
    background: none;
    color: #a12626;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
}

    .lease-card-cancel:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

/* common.css makes every .modal-content transparent; each dialog brings its own panel. */
#ModalLeaseCard .modal-content {
    background: #fff;
    border-radius: 12px;
}

#ModalLeaseCard .modal-header {
    border-bottom: 1px solid #EEEEEE;
    padding: 16px 24px;
}

#ModalLeaseCard .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #383838;
}

#ModalLeaseCard .modal-body {
    padding: 20px 24px 24px;
}

/* ---- /Lease/Card ---- */

/* custom.css pins .container to 1280px !important, so the width cap sits on the contents. */
.lease-page {
    margin-top: 50px;
    padding-bottom: 120px;
}

    .lease-page h1,
    .lease-page-box {
        max-width: 720px;
        margin-inline: auto;
    }

    .lease-page h1 {
        font-weight: 700;
        font-size: 1.5rem;
        color: #191919;
        margin-bottom: 20px;
    }

.lease-page-box {
    border: 1px solid #70707036;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 24px;
}

.lease-summary {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #EEEEEE;
}

.lease-summary-photo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #EEEEEE;
    border-radius: 6px;
    padding: 4px;
    flex: 0 0 auto;
}

.lease-summary-text {
    min-width: 0;
}

.lease-summary-name {
    font-weight: 600;
}

.lease-summary-plan {
    margin-top: 4px;
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .lease-page {
        margin-top: 24px;
    }

    .lease-page-box {
        padding: 16px;
    }

    .lease-card-btn {
        flex-basis: 100%;
    }
}

/* ---- /Lease/Confirm and /Lease/Confirmation ----
   Same box, banners, buttons and summary as /Lease/Card; below, only what the confirmation adds:
   the plan table, the consent, the busy button and the "confirmed" mark. */

.lease-plan-table-wrap {
    overflow-x: auto;
    margin-bottom: 12px;
    border: 1px solid #e8edf2;
    border-radius: 8px;
}

.lease-plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .lease-plan-table th,
    .lease-plan-table td {
        padding: 8px 12px;
        border-bottom: 1px solid #EEEEEE;
        text-align: start;
        white-space: nowrap;
    }

    .lease-plan-table th {
        background: #F7F7F7;
        color: #6b7280;
        font-weight: 600;
    }

    .lease-plan-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .lease-plan-table .lease-plan-num {
        width: 3em;
        color: #6b7280;
    }

    .lease-plan-table .lease-plan-amount {
        text-align: end;
        font-variant-numeric: tabular-nums;
    }

    .lease-plan-table .lease-plan-total {
        font-weight: 600;
    }

    /* Month 1 is the one charged now. */
    .lease-plan-table tr.lease-plan-now td {
        background: #f3f7fe;
        font-weight: 600;
    }

.lease-confirm-per-charge {
    font-weight: 700;
    font-size: 1.05rem;
}

.lease-confirm-deadline {
    color: #8a5300;
    font-size: 0.875rem;
    font-weight: 600;
}

/* "Charged to": the card as a tile - its brand mark (the footer's logos), the card as every lease
   page writes it, what it pays, and "Change", a quiet text button (Confirm & pay stays the page's
   one filled button) at least 44px tall, in a blue dark enough to read (#1a66d2 on white, 5.4:1).
   On a phone "Change" takes its own row across the bottom of the tile, a full-width target. */
.lease-pay-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
    padding-block: 12px;
    padding-inline: 16px 10px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

    /* Back from a card change: the new card, picked out with the notice's green. */
    .lease-pay-card.is-changed {
        border-color: #b7ebc6;
        box-shadow: 0 0 0 3px #ecfdf3;
    }

.lease-pay-card-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 36px;
    border: 1px solid #e8edf2;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
}

    .lease-pay-card-mark img {
        display: block;
        width: 34px;
        height: auto;
    }

.lease-pay-card-text {
    flex: 1 1 11rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lease-pay-card-name {
    color: #191919;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.lease-pay-card-hint {
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.lease-pay-card-change {
    flex: 0 0 auto;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #1a66d2;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

    .lease-pay-card-change:hover {
        background: #f3f7fe;
        border-color: #c9dafb;
        color: #1a66d2;
        text-decoration: none;
    }

    /* style.css takes every outline away (*:focus, !important): the keyboard's ring comes back here,
       as site.css does for its hearts - :focus-visible never matches a pointer tap. */
    .lease-pay-card-change:focus-visible {
        outline: 2px solid #4285F4 !important;
        outline-offset: 2px;
    }

    .lease-pay-card-change svg {
        flex: 0 0 auto;
    }

    /* While Confirm & pay is out (lease-confirm.js): not a way off the page. */
    .lease-pay-card-change[aria-disabled="true"] {
        opacity: 0.55;
        cursor: not-allowed;
    }

/* "Card changed. Month 1 and the monthly payments will be charged to Visa ****4242." */
.lease-pay-card-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid #b7ebc6;
    border-radius: 8px;
    background: #ecfdf3;
    color: #1e6b36;
    font-size: 0.875rem;
    line-height: 1.5;
}

    /* Focused by lease-confirm.js so a screen reader reads it; not a control, so no ring. */
    .lease-pay-card-notice:focus {
        outline: none;
    }

.lease-pay-card-notice-icon {
    flex: 0 0 auto;
    position: relative;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background: #1e6b36;
}

    .lease-pay-card-notice-icon::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 45%;
        width: 5px;
        height: 10px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: translate(-50%, -50%) rotate(45deg);
    }

.lease-pay-card-notice-text strong {
    font-weight: 700;
}

/* "Visa ****4242" in a sentence: one piece, never broken across two lines. */
.lease-pay-card-nowrap {
    white-space: nowrap;
}

/* A phone: "Change" is the tile's footer - a full-width row under a hairline, as quiet as on a
   desktop, so Confirm & pay stays the one strong button. */
@media (max-width: 575.98px) {
    .lease-pay-card {
        padding-inline: 12px;
    }

    .lease-pay-card-change {
        flex-basis: calc(100% + 24px);
        margin: 0 -12px -12px;
        border: 0;
        border-top: 1px solid #EEEEEE;
        border-radius: 0 0 9px 9px;
    }

        .lease-pay-card-change:hover {
            border-top-color: #EEEEEE;
        }

        .lease-pay-card-change:focus-visible {
            outline-offset: -3px;
        }
}

/* The database's consent text is the checkbox's label, so it reads as what is being agreed to. */
.lease-consent {
    border: 1px solid #e8edf2;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 16px 0;
}

.lease-card .lease-consent-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.lease-consent-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #191919;
}

    .lease-consent-label input[type="checkbox"] {
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        margin: 1px 0 0;
        accent-color: #4285F4;
        cursor: pointer;
    }

    .lease-consent-label input[type="checkbox"]:disabled {
        cursor: not-allowed;
    }

.lease-consent-para {
    display: block;
}

    .lease-consent-para + .lease-consent-para {
        margin-top: 10px;
    }

/* Confirm & pay while the call is out: a small spinner before the label. */
.lease-card-btn.is-busy::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-inline-end: 8px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: leaseCardSpin 0.8s linear infinite;
}

/* The "Lease confirmed" tick. */
.lease-confirm-done {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #ecfdf3;
    border: 2px solid #1e6b36;
}

    .lease-confirm-done::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 45%;
        width: 12px;
        height: 22px;
        border: solid #1e6b36;
        border-width: 0 3px 3px 0;
        transform: translate(-50%, -50%) rotate(45deg);
    }

@media (max-width: 575.98px) {
    .lease-plan-table th,
    .lease-plan-table td {
        padding: 6px 8px;
    }
}

/* ---- /Lease/FakeCardGateway (Testing only) ----
   A page of its own, no site layout: it stands in for the gateway's site. */

.lease-fake-gateway {
    margin: 0;
    min-height: 100vh;
    background: #1f2937;
    color: #111827;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    box-sizing: border-box;
}

.lease-fake-box {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

    .lease-fake-box h1 {
        font-size: 1.25rem;
        margin: 0 0 8px;
    }

.lease-fake-badge {
    display: inline-block;
    margin: 0 0 12px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.lease-fake-notice {
    margin: 0 0 20px;
    padding: 10px 12px;
    border: 2px dashed #dc2626;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.9rem;
}

.lease-fake-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lease-fake-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

    .lease-fake-card:hover {
        border-color: #4285F4;
        background: #f3f7fe;
    }

.lease-fake-card-number {
    font-weight: 700;
    font-family: ui-monospace, Consolas, monospace;
}

.lease-fake-card-outcome {
    color: #4b5563;
    font-size: 0.875rem;
}
