/* Checkout page — Navid Figma node 176:8355 (same layout system as cart 3:1850) */
.navid-checkout-page {
    --navid-cart-primary: #f3703a;
    --navid-cart-secondary: #003663;
    --navid-cart-gray: #6c7580;
    --navid-cart-gray-2: #a3a9b2;
    --navid-cart-border: #ededee;
    --navid-cart-success: #009294;
    --navid-cart-error: #f54848;

    font-family: var(--navid-font, Lahzeh, Tahoma, sans-serif);
    margin-top: 24px;
    margin-bottom: 104px;
}

.navid-checkout-page .navid-cart-container {
    max-width: 1280px;
    padding-left: 0;
    padding-right: 0;
}

.navid-checkout-page .navid-cart-breadcrumb {
    margin-bottom: 56px;
    color: var(--navid-cart-gray-2);
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    text-align: right;
}

.navid-checkout-page .navid-cart-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.navid-checkout-page .navid-cart-breadcrumb a:hover {
    color: var(--navid-cart-secondary);
}

.navid-checkout-page .navid-checkout-alert {
    margin-bottom: 24px;
    border-radius: 4px;
}

/* Two-column layout: form (765px) + sidebar (403px), gap 56px */
.navid-checkout-page .navid-checkout-layout {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 56px;
}

.navid-checkout-page .navid-checkout-main {
    flex: 0 0 765px;
    width: 765px;
    max-width: 100%;
    min-width: 0;
}

.navid-checkout-page .navid-cart-sidebar {
    flex: 1 1 403px;
    max-width: 403px;
    border-right: 1px solid var(--navid-cart-border);
    padding-right: 56px;
    box-sizing: border-box;
}

.navid-checkout-page .navid-checkout-section {
    margin-bottom: 56px;
    overflow: visible;
}

.navid-checkout-page .navid-checkout-form,
.navid-checkout-page .navid-checkout-form__grid {
    overflow: visible;
}

@media (min-width: 992px) {
    .navid-checkout-page .navid-checkout-form__grid > [class*='col-'] {
        position: relative;
        z-index: 0;
    }
}

.navid-checkout-page .navid-checkout-section:last-child {
    margin-bottom: 0;
}

.navid-checkout-page .navid-checkout-section__title {
    margin: 0 0 24px;
    padding: 0;
    color: var(--navid-cart-secondary);
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
}

/* Kill legacy shopping-page / section-title decorations */
.navid-checkout-page .section-title,
.navid-checkout-page .section-title h2 {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.navid-checkout-page .section-title::before,
.navid-checkout-page .section-title::after {
    display: none !important;
}

.navid-checkout-page .section-title h2 {
    color: var(--navid-cart-secondary);
    font-size: 24px;
    font-weight: 500;
}

.navid-checkout-page .page-content,
.navid-checkout-page .form-ui,
.navid-checkout-page .checkout-div,
.navid-checkout-page .dt-sn,
.navid-checkout-page .checkout-pack {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

/* Field grid gaps — navid-form.css (--navid-form-field-gap / --navid-form-row-gap) */

/* Order description textarea — override legacy form-ui fixed height */
.navid-checkout-page .navid-checkout-form .navid-field--textarea .navid-field__box {
    min-height: 120px;
    height: 120px;
}

.navid-checkout-page .navid-checkout-form .navid-field--textarea .navid-field__input,
.navid-checkout-page .navid-checkout-form .navid-field--textarea textarea {
    min-height: 100% !important;
    height: 100% !important;
    box-sizing: border-box;
}

/* Floating label selects — match profile address (undo legacy .form-ui .custom-select-ui) */
.navid-checkout-page .navid-field--select .navid-field__select.custom-select-ui .navid-select {
    border: 0;
    border-radius: 4px;
    background: transparent;
}

.navid-checkout-page .navid-field--select .navid-select__trigger {
    height: 56px;
    min-height: 56px;
    padding: 12px 16px;
    gap: 24px;
}

.navid-checkout-page .navid-field--select .navid-select__caret {
    position: static;
    margin-top: 0;
}

.navid-checkout-page .navid-field--select .navid-select__list {
    padding: 8px;
    border: 1px solid var(--navid-tertiary);
    border-radius: 4px;
    box-shadow: none;
}

/* Floating label fields — see navid-form.css (shared with profile / wallet) */

@media (min-width: 992px) {
    .navid-checkout-page .navid-checkout-form__grid--address > .navid-checkout-form__address-col {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .navid-checkout-page .navid-checkout-form__grid--address > .navid-checkout-form__plaque-unit-col {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

.navid-checkout-page .navid-cart-payable .navid-checkout-sidebar-agreement {
    width: 100%;
    margin-bottom: 0;
}

.navid-checkout-page .navid-checkout-sidebar-agreement .custom-control-label {
    color: var(--navid-cart-gray);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    text-align: right;
    padding-right: 28px;
}

.navid-checkout-page
    .navid-checkout-sidebar-agreement
    .custom-control-label::before,
.navid-checkout-page
    .navid-checkout-sidebar-agreement
    .custom-control-label::after {
    right: 0 !important;
    left: auto !important;
}

.navid-checkout-page .navid-checkout-sidebar-agreement a {
    color: var(--navid-cart-primary);
}

/* Reserve / agreement */
.navid-checkout-page .navid-checkout-reserve {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.navid-checkout-page .navid-checkout-reserve .custom-control {
    padding-right: 0;
    padding-left: 0;
}

.navid-checkout-page .navid-checkout-reserve .custom-control-label {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 16px 16px 16px 48px;
    border: 1px solid var(--navid-cart-border);
    border-radius: 4px;
    background: #fff;
    color: var(--navid-cart-gray);
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
}

.navid-checkout-page .navid-checkout-reserve .custom-control-label::before,
.navid-checkout-page .navid-checkout-reserve .custom-control-label::after {
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    transform: translateY(-50%);
}

.navid-checkout-page
    .navid-checkout-reserve
    .custom-control-input:checked
    ~ .custom-control-label {
    border-color: var(--navid-cart-primary);
}

.navid-checkout-page .navid-checkout-agreement .custom-control-label {
    color: var(--navid-cart-gray);
    font-size: 15px;
    padding-right: 28px;
}

.navid-checkout-page .navid-checkout-agreement .custom-control-label::before,
.navid-checkout-page .navid-checkout-agreement .custom-control-label::after {
    right: 0 !important;
    left: auto !important;
}

.navid-checkout-page .navid-checkout-agreement a {
    color: var(--navid-cart-primary);
}

/* Carrier & payment option cards */
.navid-checkout-page .navid-checkout-options .checkout-time-table {
    width: 100%;
    padding: 0 !important;
}

.navid-checkout-page .navid-checkout-options .row {
    margin: 0;
}

.navid-checkout-page .navid-checkout-options .col-12 {
    padding: 0;
    margin-bottom: 12px;
}

.navid-checkout-page .navid-checkout-options .col-12:last-child {
    margin-bottom: 0;
}

.navid-checkout-page .radio-box {
    width: 100%;
    float: none !important;
    margin: 0;
    clear: both;
}

.navid-checkout-page .radio-box .custom-control-label {
    position: relative;
    display: flex !important;
    align-items: flex-start;
    width: 100%;
    min-height: 72px;
    padding: 16px 48px 16px 16px;
    border: 1px solid var(--navid-cart-border);
    border-radius: 4px;
    background: #fff;
    float: none !important;
    cursor: pointer;
    box-sizing: border-box;
}

.navid-checkout-page .radio-box .custom-control-label::before,
.navid-checkout-page .radio-box .custom-control-label::after {
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    margin-top: 0;
    transform: translateY(-50%) !important;
}

.navid-checkout-page
    .radio-box
    .custom-control-input:checked
    ~ .custom-control-label {
    border: 2px solid var(--navid-cart-primary);
    padding-right: 47px;
}

.navid-checkout-page .radio-box .content-box {
    float: none !important;
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navid-checkout-page .checkout-additional-options-checkbox-image {
    float: none !important;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-left: 12px;
    margin-right: 0;
    font-size: 32px;
    line-height: 40px;
    color: var(--navid-cart-gray);
    object-fit: contain;
}

.navid-checkout-page .checkout-time-table-title-bar,
.navid-checkout-page .checkout-time-table-title-bar-city {
    color: var(--navid-cart-secondary);
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
    padding: 0 8px;
}

.navid-checkout-page .checkout-time-table-subtitle-bar {
    display: block;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    list-style: none;
}

.navid-checkout-page .checkout-time-table-subtitle-bar > li {
    border: 0 !important;
    padding: 0 8px !important;
    margin: 0 !important;
    color: var(--navid-cart-gray);
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
}

.navid-checkout-page .navid-checkout-back {
    margin-top: 56px;
}

.navid-checkout-page .navid-checkout-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navid-cart-gray);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none !important;
    border: 0 !important;
}

.navid-checkout-page .navid-checkout-back a:hover {
    color: var(--navid-cart-secondary);
}

.navid-checkout-page .navid-checkout-back .mdi {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 1199px) {
    .navid-checkout-page .navid-checkout-layout {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .navid-checkout-page .navid-checkout-main,
    .navid-checkout-page .navid-cart-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .navid-checkout-page .navid-cart-sidebar {
        border-right: 0;
        padding-right: 0;
        padding-bottom: 32px;
        border-bottom: 1px solid var(--navid-cart-border);
    }
}

@media (max-width: 767px) {
    .navid-checkout-page {
        margin-bottom: 64px;
    }

    .navid-checkout-page .navid-cart-breadcrumb {
        margin-bottom: 24px;
    }

    .navid-checkout-page .navid-checkout-section {
        margin-bottom: 40px;
    }

    .navid-checkout-page .navid-checkout-section__title,
    .navid-checkout-page .section-title h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .navid-checkout-page .navid-checkout-form__grid > [class*='col-'] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ——— Mobile checkout (Figma 3:20895, 240:15495, 240:15497, 3:21115) ——— */
.navid-checkout-mobile-header,
.navid-checkout-mobile-sticky,
.navid-checkout-mobile-foot,
.navid-checkout-mobile-agreement,
.navid-checkout-mobile-coupon {
    display: none;
}

@media (max-width: 991px) {
    body.navid-checkout-page-active {
        --navid-checkout-mobile-header-h: 88px;
        --navid-checkout-mobile-sticky-h: 104px;
        padding-top: var(--navid-checkout-mobile-header-h);
        padding-bottom: calc(var(--navid-mobile-bottom-nav-h, 88px) + var(--navid-checkout-mobile-sticky-h) + 16px);
        scroll-padding-bottom: calc(var(--navid-mobile-bottom-nav-h, 88px) + var(--navid-checkout-mobile-sticky-h) + 16px);
    }

    body.navid-checkout-page-active header.navid-header {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        min-height: 0;
        background: transparent;
        box-shadow: none;
        pointer-events: none;
        z-index: 1000;
    }

    body.navid-checkout-page-active header.navid-header .navid-header__mobile-wrap {
        background: transparent;
        pointer-events: none;
    }

    body.navid-checkout-page-active header.navid-header .navid-header__mobile,
    body.navid-checkout-page-active header.navid-header .navid-header__mobile-search,
    body.navid-checkout-page-active .navid-drawer {
        display: none !important;
    }

    body.navid-checkout-page-active .navid-bottom-nav {
        pointer-events: auto;
    }

    body.navid-checkout-page-active footer.navid-footer {
        display: none !important;
    }

    .navid-checkout-page {
        margin-top: 0;
        margin-bottom: 0;
    }

    .navid-checkout-page .navid-cart-container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .navid-checkout-page .navid-cart-breadcrumb--desktop,
    .navid-checkout-page .navid-cart-sidebar,
    .navid-checkout-page .navid-checkout-back--desktop {
        display: none !important;
    }

    .navid-checkout-page .navid-checkout-layout {
        flex-direction: column;
        gap: 0;
    }

    .navid-checkout-page .navid-checkout-main {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .navid-checkout-mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        display: grid;
        grid-template-columns: 56px 1fr;
        align-items: center;
        gap: 8px;
        min-height: var(--navid-checkout-mobile-header-h);
        padding: 16px;
        background: #fff;
        border-bottom: 1px solid var(--navid-cart-border);
        box-sizing: border-box;
    }

    .navid-checkout-mobile-header__back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        text-decoration: none !important;
    }

    .navid-checkout-mobile-header__back .navid-icon {
        width: 24px;
        height: 24px;
    }

    .navid-checkout-mobile-header__title {
        margin: 0;
        padding-left: 56px;
        color: var(--navid-cart-gray);
        font-size: 16px;
        font-weight: 400;
        line-height: normal;
        text-align: center;
        white-space: nowrap;
    }

    .navid-checkout-page .navid-checkout-alert {
        margin: 16px 16px 0;
        border-radius: 4px;
        border: 0;
        background: var(--navid-cart-error);
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        padding: 10px 16px;
    }

    .navid-checkout-page .navid-checkout-alert .close,
    .navid-checkout-page .navid-checkout-alert .alert-link {
        color: #fff;
    }

    .navid-checkout-page .navid-checkout-section {
        margin-bottom: 0;
        padding-top: 24px;
        padding-bottom: 24px;
        border-bottom: 8px solid var(--navid-cart-border);
    }

    .navid-checkout-page .navid-checkout-section--reserve {
        padding-top: 16px;
    }

    .navid-checkout-page .navid-checkout-section:last-of-type {
        border-bottom: 0;
    }

    .navid-checkout-page .navid-checkout-section__title,
    .navid-checkout-page .section-title h2 {
        margin: 0 0 0;
        padding: 0 16px !important;
        color: var(--navid-cart-secondary);
        font-size: 20px;
        font-weight: 500;
        line-height: normal;
        text-align: right;
    }

    .navid-checkout-page .navid-checkout-form.form-ui.checkout-div,
    .navid-checkout-page .navid-checkout-options {
        padding: 16px 16px 0 !important;
    }

    .navid-checkout-page .navid-checkout-form__fields {
        gap: var(--navid-form-row-gap, 24px);
    }

    .navid-checkout-page .navid-checkout-form__grid {
        --navid-form-grid-gap-x: var(--navid-form-field-gap, 16px);
        margin-left: 0;
        margin-right: 0;
        row-gap: var(--navid-form-field-gap, 16px);
    }

    .navid-checkout-page .navid-checkout-form__grid > [class*='col-'] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
    }

    .navid-checkout-page .navid-checkout-form__grid--address {
        display: flex;
        flex-wrap: wrap;
        row-gap: var(--navid-form-field-gap, 16px);
    }

    .navid-checkout-page .navid-checkout-form__grid--address > .navid-checkout-form__address-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .navid-checkout-page .navid-checkout-form__grid--address > .navid-checkout-form__plaque-unit-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .navid-checkout-page .navid-checkout-form__grid--plaque-unit {
        --navid-form-grid-gap-x: var(--navid-form-field-gap-tight, 8px);
        margin-left: calc(var(--navid-form-grid-gap-x) / -2);
        margin-right: calc(var(--navid-form-grid-gap-x) / -2);
    }

    .navid-checkout-page .navid-checkout-form__grid--plaque-unit > .navid-checkout-form__plaque-col,
    .navid-checkout-page .navid-checkout-form__grid--plaque-unit > .navid-checkout-form__unit-col {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: calc(var(--navid-form-grid-gap-x) / 2);
        padding-right: calc(var(--navid-form-grid-gap-x) / 2);
    }

    .navid-checkout-page .navid-field--textarea .navid-field__box {
        min-height: 168px;
        height: 168px;
    }

    .navid-checkout-page .navid-field--textarea .navid-field__input {
        min-height: 100% !important;
        height: 100% !important;
    }

    .navid-checkout-page .navid-checkout-options .col-12 {
        margin-bottom: 24px;
    }

    .navid-checkout-page #checkout-carrier-container .dt-sn,
    .navid-checkout-page #checkout-carrier-container .row {
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .navid-checkout-page #checkout-carrier-container .checkout-additional-options-checkbox-image {
        display: none;
    }

    .navid-checkout-page .radio-box .custom-control-label {
        min-height: auto;
        padding: 16px 48px 16px 16px;
        align-items: flex-start;
    }

    .navid-checkout-page .radio-box .custom-control-input:checked ~ .custom-control-label {
        border-width: 2px;
        padding-right: 47px;
    }

    .navid-checkout-page .checkout-time-table-title-bar,
    .navid-checkout-page .checkout-time-table-title-bar-city {
        color: var(--navid-cart-secondary);
        font-size: 16px;
        font-weight: 500;
    }

    .navid-checkout-page .checkout-time-table-subtitle-bar > li {
        font-size: 12px;
        color: var(--navid-cart-gray);
    }

    .navid-checkout-page .navid-checkout-sidebar-agreement--desktop,
    .navid-checkout-page .navid-checkout-sidebar-btn--desktop {
        display: none !important;
    }

    .navid-checkout-mobile-foot {
        display: block;
        position: relative;
        z-index: 1;
        margin-top: 8px;
        padding-top: 16px;
        padding-bottom: calc(var(--navid-checkout-mobile-sticky-h, 104px) + 32px);
        border-top: 8px solid var(--navid-cart-border);
    }

    .navid-checkout-mobile-agreement {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        padding: 16px 16px 0 !important;
    }

    .navid-checkout-mobile-coupon {
        display: block;
        padding: 24px 16px 0 !important;
        border-bottom: 0;
    }

    .navid-checkout-mobile-coupon__hint {
        margin: 0 0 16px;
        color: var(--navid-cart-gray);
        font-size: 14px;
        font-weight: 400;
        line-height: normal;
        text-align: right;
    }

    .navid-checkout-mobile-coupon .navid-coupon__field--floating .navid-coupon__label {
        display: inline-flex;
    }

    .navid-checkout-mobile-agreement__control {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        width: 100%;
        margin: 0;
    }

    .navid-checkout-mobile-agreement__label {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        padding-right: 36px !important;
        color: var(--navid-cart-gray);
        font-size: 14px;
        font-weight: 400;
        line-height: normal;
        text-align: right;
    }

    .navid-checkout-mobile-agreement__label a {
        color: var(--navid-cart-gray);
        text-decoration: underline;
    }

    .navid-checkout-mobile-agreement .custom-control-label::before,
    .navid-checkout-mobile-agreement .custom-control-label::after {
        top: 2px !important;
        right: 0 !important;
        left: auto !important;
    }

    .navid-checkout-mobile-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--navid-mobile-bottom-nav-h, 88px);
        z-index: 999;
        display: block;
        background: #fff;
        border-top: 1px solid var(--navid-cart-border);
        box-sizing: border-box;
    }

    .navid-checkout-mobile-sticky__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px;
    }

    .navid-checkout-mobile-sticky__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
        min-height: 56px;
        margin: 0;
        padding: 9px 16px;
        border: 0;
        border-radius: 4px;
        background: var(--navid-cart-primary);
        color: #fff !important;
        font-size: 16px;
        font-weight: 600;
        line-height: normal;
        cursor: pointer;
        box-shadow: none;
    }

    .navid-checkout-mobile-sticky__btn-icon {
        display: block;
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        flex-shrink: 0;
        overflow: visible;
    }

    .navid-checkout-mobile-sticky__btn-icon path {
        stroke: #fff;
        stroke-width: 2.5px;
    }

    .navid-checkout-mobile-sticky__summary {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        flex-shrink: 0;
        text-align: right;
    }

    .navid-checkout-mobile-sticky__summary-label {
        color: var(--navid-cart-gray-2);
        font-size: 10px;
        font-weight: 400;
        line-height: normal;
        white-space: nowrap;
    }

    .navid-checkout-mobile-sticky__summary-value {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--navid-cart-secondary);
        font-size: 16px;
        font-weight: 600;
        white-space: nowrap;
    }

    .navid-checkout-mobile-sticky__summary-value span:first-child {
        font-size: 14px;
        font-weight: 500;
    }
}
