/* ===================================================
   Checkout Page — Mirrors shopping-cart.css design
   =================================================== */

/* Smooth transitions */
.checkout-page * {
    transition: all 0.3s ease-in-out;
}

/* ── Page Title ────────────────────────────────────── */
.checkout-page .page-title-layout6 h1 {
    color: #fff;
    font-weight: 700;
}

.checkout-page .page-title-layout6 .lead {
    display: none;
}

/* ── Glass-style panels ──────────────────────────── */
.checkout-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 30px;
    height: 100%;
}

.checkout-panel:hover {
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.15);
}

/* ── Summary Panel (Left / Order) ────────────────── */
.summary-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.summary-hero h3 {
    color: #002B5B;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0;
}

.summary-count-chip {
    background: #f3f8ff;
    color: #01244a;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(0, 36, 74, 0.08);
}

/* Individual order line items */
.summary-card-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 36, 74, 0.06);
}

.summary-card-item:last-child {
    border-bottom: none;
}

.summary-card-item h5 {
    color: #002B5B;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.summary-card-item small {
    color: #6c757d;
    font-size: 13px;
}

.summary-card-item .text-right {
    color: #002B5B;
    white-space: nowrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 15px;
}

/* Totals block */
.summary-totals {
    border-top: 2px solid rgba(0, 36, 74, 0.08);
    margin-top: 16px;
    padding-top: 16px;
}

.summary-totals .line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
    color: #333;
}

.summary-totals .line:last-child {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid rgba(0, 36, 74, 0.1);
}

.summary-total-accent {
    font-size: 22px;
    font-weight: 800;
    color: #002B5B;
    animation: fadeIn 0.4s ease;
}

/* ── Form Panel (Right / Payment) ────────────────── */
.form-panel h3 {
    color: #002B5B;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.form-panel .form-control {
    border-radius: 10px;
    border: 1px solid #cde0ff;
    padding: 10px 16px;
    height: 48px;
    font-size: 14px;
    background: #f9fbff;
}

.form-panel .form-control:focus {
    border-color: #01244a;
    box-shadow: 0 0 0 3px rgba(1, 36, 74, 0.08);
}

.form-panel label {
    color: #002B5B;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

/* ── Payment Method Grid ─────────────────────────── */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.payment-card {
    background: #f3f8ff;
    border: 2px solid rgba(0, 36, 74, 0.08);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.payment-card i {
    font-size: 20px;
    color: #01244a;
}

.payment-card span {
    font-size: 13px;
    font-weight: 600;
    color: #002B5B;
}

.payment-card small {
    font-size: 11px;
    color: #6c757d;
}

.payment-card:hover {
    border-color: #01244a;
    background: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 36, 74, 0.1);
}

.payment-card.active {
    border-color: #01244a;
    background: #dce8f7;
    box-shadow: 0 4px 12px rgba(0, 36, 74, 0.15);
}

/* ── Confirm & Pay Button ────────────────────────── */
.checkout-page .btn__primary {
    background-color: #01244a;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    padding: 12px 36px;
    font-size: 15px;
}

.checkout-page .btn__primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.checkout-page .btn__primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Back to Cart link (matches Continue Shopping in cart) ── */
.checkout-page .btn__link.btn__secondary {
    background-color: #fee023;
    border: 2px solid #fee023 !important;
    border-radius: 50px;
    box-shadow: none;
    padding: 10px 24px;
    min-width: 0;
    height: auto;
    line-height: 1.5;
    font-weight: 600;
    color: #063464;
}

.checkout-page .btn__link.btn__secondary:hover {
    color: #01244a;
    background-color: #fee023;
    transform: none;
    box-shadow: none;
}

.checkout-page .btn__link.btn__secondary:before {
    display: none;
}

/* ── Security / Trust ────────────────────────────── */
.security-lock {
    color: #6c757d;
    font-size: 13px;
}

.security-lock i {
    color: #01244a;
    margin-right: 4px;
}

/* ── Agreement checkbox ──────────────────────────── */
.form-check-label {
    font-size: 14px;
    color: #333;
}

.form-check-label a {
    color: #01244a;
    text-decoration: underline;
}

/* ── Alerts ──────────────────────────────────────── */
#checkoutStatus {
    border-radius: 12px;
}

/* ── Fade-in animation (matches shopping-cart) ───── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 991px) {
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkout-panel {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .payment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .checkout-panel {
        padding: 20px;
        border-radius: 14px;
    }

    .summary-total-accent {
        font-size: 18px;
    }

    .form-panel .form-control {
        height: 44px;
    }
}

.order-container {
    display: flex;
    flex-direction: column;
}

.back-btn {
    border-radius: 8px !important;
    justify-content: center;
    width: fit-content;
    margin-bottom: 1rem;
}

@media (max-width:576px) {
    .back-btn {
        order: -1;
        width: stretch;
    }
}

.back-btn:hover {
    color: #2983fd !important;
    transform: translateY(-2px) !important;
}

.form-check-input {
    margin-top: 0;
}

@media (max-width: 767px) {
    .form-check-input {
        margin-top: 0.3rem;
    }
}

ol.breadcrumb.justify-content-center.mb-0 {
    justify-content: flex-start;
}

.status-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 255, 0.92));
}

.payment-status {
    padding-bottom: 140px;
}

.payment-status__layout-row {
    row-gap: 28px;
}

.payment-status__summary-col,
.payment-status__invoice-col {
    margin-bottom: 28px;
}

.payment-status .status-panel,
.payment-status .invoice-panel {
    height: auto;
}

.payment-status .status-panel {
    position: sticky;
    top: 24px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status-badge--success {
    background: rgba(76, 175, 80, 0.14);
    color: #1d7c37;
}

.status-badge--error {
    background: rgba(220, 53, 69, 0.12);
    color: #b32535;
}

.status-badge--processing {
    background: rgba(254, 224, 35, 0.22);
    color: #7c6400;
}

.status-icon {
    width: 92px;
    height: 92px;
    margin: 18px auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 38px;
}

.status-icon--success {
    background: rgba(76, 175, 80, 0.14);
    color: #1d7c37;
}

.status-icon--error {
    background: rgba(220, 53, 69, 0.12);
    color: #b32535;
}

.status-icon--processing {
    background: rgba(254, 224, 35, 0.24);
    color: #7c6400;
}

.status-details {
    margin: 0 auto;
    max-width: 520px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(0, 36, 74, 0.08);
}

.status-details .line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    color: #01244a;
    border-bottom: 1px solid rgba(0, 36, 74, 0.06);
}

.status-details .line:last-child {
    border-bottom: 0;
}

.status-actions {
    gap: 12px;
}

.invoice-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    text-align: left;
    width: 100%;
}

.invoice-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.invoice-panel__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(1, 36, 74, 0.08);
    color: #01244a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.invoice-panel__title {
    color: #01244a;
    font-weight: 800;
}

.invoice-panel__lead {
    color: #5c6b80;
}

.invoice-brand-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    min-width: 0;
}

.invoice-brand-card__logo {
    width: 160px;
    height: auto;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: transparent;
    padding: 0;
}

.invoice-brand-card__logo img {
    width: 100%;
    height: auto;
    display: block;
}

.invoice-company-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.invoice-company-strip__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(1, 36, 74, 0.04);
    color: #01244a;
    font-size: 14px;
}

.invoice-company-strip__item i {
    margin-top: 3px;
    color: #2983fd;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.invoice-meta-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 36, 74, 0.08);
}

.invoice-meta-card__label {
    display: block;
    margin-bottom: 8px;
    color: #607085;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-meta-card strong {
    color: #01244a;
    font-size: 16px;
}

.invoice-items-wrap {
    border-radius: 18px;
    border: 1px solid rgba(0, 36, 74, 0.08);
    overflow: hidden;
    background: #ffffff;
}

.invoice-items-wrap__head,
.invoice-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.invoice-items-wrap__head {
    padding: 16px 20px;
    background: #01244a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.invoice-item-row {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 36, 74, 0.06);
}

.invoice-item-row:last-child {
    border-bottom: 0;
}

.invoice-item-row h5 {
    color: #01244a;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
}

.invoice-item-row p {
    margin-bottom: 0;
    color: #607085;
    font-size: 13px;
}

.invoice-item-row strong {
    color: #01244a;
    white-space: nowrap;
}

.invoice-totals {
    max-width: 420px;
    margin-left: auto;
    margin-top: 24px;
}

.btn.is-disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 991px) {

    .invoice-panel__header,
    .invoice-company-strip,
    .invoice-meta-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .invoice-brand-card {
        min-width: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {

    .payment-status {
        padding-bottom: 100px;
    }

    .status-details,
    .invoice-item-row,
    .invoice-items-wrap__head,
    .invoice-company-strip__item,
    .invoice-meta-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .invoice-item-row,
    .invoice-items-wrap__head {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .payment-status .status-panel {
        position: static;
    }
}