/* Checkout – modern design (theme_color & font_family from app) */
:root {
    --primary-color: rgb(243, 198, 35);
    --lighter-primary-color: color-mix(in srgb, var(--primary-color) 60%, white 40%);
    --light-primary-color: color-mix(in srgb, var(--primary-color) 80%, white 20%);
    --dark-primary-color: color-mix(in srgb, var(--primary-color) 80%, black 20%);
    --darker-primary-color: color-mix(in srgb, var(--primary-color) 60%, black 40%);
    --light-text: rgb(253, 241, 241);
    --dark-text: rgb(41, 38, 0);
    --light-bg: rgb(255, 252, 229);
    --darker-bg: rgb(39, 35, 13);
    --danger-color: rgb(209, 0, 0);
    --success-color: rgb(64, 224, 0);
    --warning-color: rgb(255, 159, 0);
    --info-color: rgb(0, 174, 255);
    --white: rgb(255, 255, 255);
    --dark-bg: rgb(56, 55, 49);
    --gray: rgb(80, 80, 80);
    --font-family: "Public Sans", sans-serif;
    --ch-radius: 12px;
    --ch-radius-lg: 16px;
    --ch-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --ch-border: rgba(0, 0, 0, 0.08);
}

body,
html {
    font-family: var(--font-family);
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
}

/* ----- Header ----- */
.checkout-header {
    background: var(--white);
    border-bottom: 1px solid var(--ch-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.checkout-header .container {
    position: relative;
}

.logo-img {
    height: 44px;
    width: auto;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1;
}

.btn-back {
    font-size: 0.9375rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--primary-color);
}

/* ----- Main ----- */
.checkout-main {
    background: #f8f9fa;
    padding: 28px 0 40px;
    flex: 1;
}

.checkout-main .container {
    max-width: 960px;
}

.checkout-main .row {
    --bs-gutter-x: 1.5rem;
}

/* ----- Cards ----- */
.checkout-main .card {
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow);
    background: var(--white);
    padding: 28px 26px;
}

.checkout-main .card h4,
.checkout-main .card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

/* ----- Form ----- */
.checkout-main .form-label.text-muted {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.checkout-main .input,
.checkout-main .form-control,
.checkout-main .form-control-lg {
    border: 1px solid #e5e7eb !important;
    border-radius: var(--ch-radius) !important;
    padding: 12px 14px !important;
    font-size: 1rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-main .input:focus,
.checkout-main .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent) !important;
    outline: none !important;
}

.checkout-main .form-select,
.checkout-main .form-select.form-control-lg {
    border: 1px solid #e5e7eb !important;
    border-radius: var(--ch-radius) !important;
    padding: 12px 14px !important;
}

.checkout-main .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent) !important;
    outline: none !important;
}

.form-control:read-only {
    background: #f9fafb;
    cursor: not-allowed;
    color: #6b7280;
}

/* ----- Radio option cards (order type, payment, address method) ----- */
.checkout-main .d-flex.gap-2 {
    flex-wrap: wrap;
    gap: 10px !important;
}

.checkout-main .d-flex.gap-2 .col-6,
.checkout-main .d-flex.gap-2 [class*="col-"] {
    min-width: 0;
    flex: 1 1 0;
}

.checkout-main .btn-radio {
    background: var(--white);
    border: 2px solid #e5e7eb;
    color: #374151;
    border-radius: var(--ch-radius);
    padding: 12px 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 0;
    width: 100%;
    text-align: center;
}

.checkout-main .btn-radio:hover {
    border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
    background: color-mix(in srgb, var(--primary-color) 8%, white);
}

.checkout-main .btn-radio .fa-2x {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 6px;
    display: block;
}

.checkout-main .btn-radio > div:last-child {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

input[type="radio"]:checked + .btn-radio,
input[type="checkbox"]:checked + .btn-radio {
    background: color-mix(in srgb, var(--primary-color) 12%, white) !important;
    border-color: var(--primary-color) !important;
    color: #111827 !important;
}

/* ----- Primary button ----- */
.checkout-main .btn-primary {
    background: var(--primary-color);
    border: none;
    color: #111827;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: var(--ch-radius);
    transition: background 0.2s ease, transform 0.15s ease;
}

.checkout-main .btn-primary:hover {
    background: var(--dark-primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

.checkout-main .btn-primary:active {
    transform: translateY(0);
}

/* ----- Order Summary ----- */
#orderSummary {
    --bs-list-group-border-width: 0;
}

#orderSummary .list-group-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--ch-border);
    font-size: 0.9375rem;
}

#orderSummary .list-group-item:last-child {
    border-bottom: none;
}

#orderSummary .list-group-item img {
    border-radius: var(--ch-radius);
    flex-shrink: 0;
}

.checkout-main .d-flex.justify-content-between.mb-2 {
    font-size: 0.9375rem;
}

.checkout-main hr {
    border-color: var(--ch-border);
    margin: 16px 0;
}

.checkout-main .fw-bold.fs-5 {
    font-size: 1.125rem !important;
}

/* Discount code row */
.checkout-main #discount {
    border-radius: var(--ch-radius);
    border: 1px solid #e5e7eb;
}

.checkout-main #apply {
    border-radius: var(--ch-radius);
    font-weight: 600;
    padding: 12px 20px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    transition: all 0.2s ease;
}

.checkout-main #apply:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Place Order button */
#submitBtn {
    margin-top: 24px !important;
    padding: 16px !important;
    font-size: 1rem !important;
}

/* ----- Delivery / Map section ----- */
#map-section .card {
    margin-top: 0;
}

.map-container {
    border: 1px solid #e5e7eb;
    border-radius: var(--ch-radius);
    overflow: hidden;
    background: #f9fafb;
}

.instruction-text {
    font-size: 0.8125rem;
    margin-top: 4px;
}

#current-location {
    border-radius: 8px;
    font-weight: 500;
}

#current-location:hover {
    background: color-mix(in srgb, var(--primary-color) 12%, white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.manual-address-card,
.map-card {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----- Payment Info (Whish) ----- */
#payment-info.card {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
}

#payment-info h5 {
    font-size: 1rem;
}

#payment-info .bg-light {
    background: var(--white) !important;
    border-radius: var(--ch-radius);
    padding: 16px !important;
}

#copy-whish:hover {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: var(--white) !important;
}

/* ----- Footer ----- */
.checkout-footer {
    background: var(--white);
    border-top: 1px solid var(--ch-border);
    padding: 16px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.checkout-footer i {
    color: #9ca3af;
}

.checkout-footer a {
    color: var(--primary-color);
}

.checkout-footer a:hover {
    color: var(--dark-primary-color);
}

/* ----- Alerts ----- */
.checkout-main .alert {
    border-radius: var(--ch-radius);
    border: none;
}

/* ----- Responsive ----- */
@media (max-width: 991px) {
    .checkout-main {
        padding: 20px 0 32px;
    }
    .checkout-main .card {
        padding: 24px 22px;
    }
}

@media (max-width: 768px) {
    .checkout-header {
        padding: 12px 0;
    }
    .checkout-header .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .logo-img {
        height: 36px;
    }
    .logo-text {
        font-size: 1rem;
    }
    .btn-back {
        font-size: 0.875rem;
        padding: 8px 0;
    }
    .checkout-main {
        padding: 16px 0 24px;
    }
    .checkout-main .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .checkout-main .row.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .checkout-main .card {
        padding: 24px 18px;
        border-radius: var(--ch-radius);
    }
    .checkout-main .card h4 {
        font-size: 1.0625rem;
    }
    .checkout-main .input,
    .checkout-main .form-control,
    .checkout-main .form-control-lg {
        padding: 14px 16px !important;
        min-height: 48px;
    }
    .checkout-main .btn-radio {
        padding: 12px 8px;
    }
    .checkout-main .btn-radio .fa-2x {
        font-size: 1.15rem;
    }
    .checkout-main .btn-radio > div:last-child {
        font-size: 0.75rem;
    }
    #submitBtn {
        width: 100%;
        padding: 16px !important;
        margin-top: 20px !important;
    }
    .checkout-main .d-flex.mt-4 {
        flex-wrap: wrap;
    }
    .checkout-main #discount {
        flex: 1 1 100%;
        margin-bottom: 8px;
    }
    .checkout-main #apply {
        width: 100%;
    }
    .checkout-footer {
        padding: 14px 12px;
        font-size: 0.75rem;
    }
    .checkout-footer .d-flex {
        flex-direction: column;
        gap: 8px !important;
    }
    .checkout-footer .d-none.d-md-inline {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .checkout-header .position-absolute.start-0 {
        left: 0;
    }
    .checkout-main .card.py-4.px-2 .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    .checkout-main .card.py-4.px-2 .row > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }
    .checkout-main .d-flex.gap-2 .col-6,
    .checkout-main .d-flex.gap-2 [class*="col-"] {
        flex: 1 1 0;
        min-width: 0;
    }
    .map-container {
        height: 260px;
    }
    #map {
        height: 260px !important;
    }
    #current-location {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }
    /* Order summary list on checkout index */
    #orderSummary .list-group-item {
        flex-wrap: wrap;
    }
    #orderSummary .list-group-item img {
        width: 52px !important;
        height: 52px !important;
    }
}

.btn-whatsapp {
    background-color: #25d366;
}

.top-15 {
    top: 15%;
    z-index: 1000;
}

#map {
    height: 100%;
    width: 100%;
}

.form-select option {
    padding: 0.5rem;
}

#manual-address-section .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#manual-address-section .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* ----- Thanks page ----- */
.checkout-thanks .card {
    padding: 28px;
}

/* Confirmation header */
.thanks-confirm__icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thanks-confirm__icon {
    color: var(--white);
    font-size: 1.75rem;
}

.thanks-confirm__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.thanks-confirm__subtitle {
    font-size: 0.9375rem;
}

.thanks-badge {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border-radius: var(--ch-radius);
}

.thanks-whatsapp-btn {
    background: #25D366;
    color: var(--white) !important;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 24px;
    border-radius: var(--ch-radius);
    transition: background 0.2s ease, transform 0.15s ease;
}

.thanks-whatsapp-btn:hover {
    background: #20BA5A;
    color: var(--white) !important;
    transform: translateY(-1px);
}

/* Order Summary & Customer cards */
.checkout-thanks .card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ch-border);
}

.checkout-thanks .card .border-top {
    border-top: 1px solid var(--ch-border) !important;
}

.checkout-thanks .card .border-bottom {
    border-bottom: 1px solid var(--ch-border) !important;
}

.checkout-thanks .d-flex.align-items-center.py-3.border-bottom {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.checkout-thanks .d-flex.align-items-center.py-3.border-bottom img {
    border-radius: var(--ch-radius);
}

.checkout-thanks .text-primary {
    color: var(--primary-color) !important;
}

.checkout-thanks .text-primary:hover {
    color: var(--dark-primary-color) !important;
}

/* What's Next section */
.checkout-thanks .card .h6 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.checkout-thanks .card .text-primary.fa-lg {
    color: var(--primary-color) !important;
}

/* CTA buttons */
.thanks-cta-btn {
    padding: 14px 28px !important;
    font-size: 1rem !important;
    font-weight: 600;
}

.thanks-invoice-btn {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #374151;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--ch-radius);
    transition: all 0.2s ease;
}

.thanks-invoice-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, white);
}

/* Thanks page – mobile */
@media (max-width: 768px) {
    .checkout-thanks .card {
        padding: 20px 16px;
    }
    .thanks-confirm__icon-wrap {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }
    .thanks-confirm__icon {
        font-size: 1.5rem;
    }
    .thanks-confirm__title {
        font-size: 1.25rem;
    }
    .thanks-confirm__subtitle {
        font-size: 0.875rem;
    }
    .thanks-confirm__badges {
        flex-direction: column;
        align-items: center;
    }
    .thanks-badge {
        width: 100%;
        text-align: center;
    }
    .thanks-whatsapp-btn {
        display: block;
        width: 100%;
        text-align: center;
    }
    .checkout-thanks .card h2 {
        font-size: 0.9375rem;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom {
        flex-wrap: wrap;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom .flex-shrink-0.me-3 {
        margin-right: 12px !important;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom img {
        width: 56px !important;
        height: 56px !important;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom .flex-grow-1 {
        min-width: 0;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom .flex-shrink-0.text-end {
        flex: 0 0 100%;
        text-align: left !important;
        margin-top: 4px;
        padding-left: 68px;
    }
    .checkout-thanks .row .col-md-4 {
        margin-bottom: 16px;
    }
    .checkout-thanks .row .col-md-4:last-child {
        margin-bottom: 0;
    }
    .thanks-cta-btn,
    .thanks-invoice-btn {
        width: 100%;
        display: block;
        text-align: center;
    }
    .checkout-thanks .text-center.mt-5 .d-flex {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .checkout-thanks .container .row.justify-content-center {
        margin-left: -12px;
        margin-right: -12px;
    }
    .checkout-thanks .container .row .col-lg-8 {
        padding-left: 12px;
        padding-right: 12px;
    }
    .checkout-thanks .d-flex.align-items-center.py-3.border-bottom .flex-shrink-0.text-end {
        padding-left: 0;
    }
}
