.main-content-wrapper {
    max-width: 100%;
}

.btn-cart {
    display: none;
}

.btn-next-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .btn-next {
        padding: 0;
        padding-inline-end: 45px;

        @media (max-width: 525px) {
            order: 1;
            padding: 0 !important;
        }

        &:before {
            transform: translate(-6px, 6px);
        }

        & .btn-dots {
            left: unset;
            right: 0;

            [dir="rtl"] & {
                right: unset;
                left: 0;
            }
        }

        &:disabled {
            filter: grayscale(1);
            pointer-events: none;
        }
    }
}

.step-pagination {
    color: #595a5a;
    font-size: 24px;
    font-weight: 700;
    line-height: normal;

    @media (max-width: 525px) {
        order: 2;
        margin-bottom: 12px;
        margin-top: 50px;
    }
}

.tabs {
    padding-top: 32px;
}

.contact-person-wrapper {
    padding-top: 32px;
    padding-bottom: 32px;
}

.box-title {
    color: #08474a;
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: normal;

    & .__highlight {
        color: #01af74;
        font-size: 1em;
    }
}

#boxes-items {
    display: block;
    max-width: 100%;
    width: 100%;
}

.boxes-list {
    display: grid;
    max-width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    align-items: stretch;
    grid-gap: 24px;

    @media (max-width: 1024px) {
        grid-gap: 16px;
    }

    @media (max-width: 767px) {
        grid-template-columns: 100%;
    }

    & .boxes-item {
        grid-column: span 1;
    }

    & .__summary {
        width: 100%;
        margin: 0;
        padding: 12px 24px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        border: 1px solid #c9e8e8;

        @media (min-width: 768px) {
            grid-column: span 3;
        }

        & .box-title {
            @media (max-width: 525px) {
                font-size: 26px;
            }
        }
    }
}

.boxes-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid #c9e8e8;
    background: #fafafa;

    & .__content {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        padding: 16px 32px 32px;
        background: #f4fbf8;

        @media (max-width: 1024px) {
            padding: 16px 24px;
        }

        @media (min-width: 525px) and (max-width: 767px) {
            display: flex;
            align-items: center;
            gap: 24px;
        }
    }

    & .__image {
        flex: 1 1 auto;
        width: 100%;
        aspect-ratio: 1;
        max-width: 240px;
        margin: 0 auto 24px;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            max-width: 100%;
            height: auto;
        }

        @media (min-width: 525px) and (max-width: 767px) {
            max-width: 160px;
            margin: 0;
        }
    }

    & .__name {
        margin-bottom: 4px;
    }

    & .__size {
        color: #08474a;
        font-size: 18px;
        margin: 0;
        font-weight: 500;
        line-height: normal;
    }

    & .__quantity {
        display: flex;
        align-items: stretch;
        border: 1px solid #c9e8e8;
        background: #fff;
        margin: -1px;
    }

    & .__input-wrap {
        flex: 1 1 auto;
        max-width: 100%;

        &:has(.__quantity-buttons) {
            max-width: calc(100% - 66px);
        }
    }

    & .__input {
        width: 100%;
        max-width: 100%;
        height: 78px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 24px;
        color: #01af74;
        text-align: center;
        font-size: 42px;
        font-weight: 700;
        line-height: normal;
        box-sizing: border-box;
        border: none !important;
        outline: none !important;

        &:focus {
            color: #01af74;
        }

        &[readonly],
        &:disabled {
            color: rgba(8, 72, 74, 0.50);
            pointer-events: none;
        }
    }

    & .__quantity-buttons {
        flex: 0 0 66px;
        width: 66px;
        display: grid;
        grid-template-rows: 1fr 1fr;
        border-left: 1px solid #c9e8e8;

        [dir="rtl"] & {
            border-left: 0;
            border-right: 1px solid #c9e8e8;
        }

        & button {
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            padding: 0;
            cursor: pointer;
            border: none;
            transition: background 0.15s ease-in-out;

            &:active {
                background: #f4fbf8;
            }

            &:first-child {
                border-bottom: 1px solid #c9e8e8;
            }

            &:disabled {
                pointer-events: none;
                filter: grayscale(1);
            }
        }
    }
}

.radio-button {
    display: inline-flex;
    gap: 8px;
    color: #000;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;

    input[type="radio"] {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    & .__checkbox {
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: #efefef;
        border: 1.5px solid rgba(0, 0, 0, 0.1);
        transition: border 0.4s ease-in-out;
    }

    &:has(input:checked) .__checkbox {
        border: 8px solid #01af74;
    }
}

.schedule-form {
    display: grid;
    grid-template-columns: 100%;
    grid-gap: 32px;

    & .__fieldset {
        display: block;
        width: 100%;
        border: none;
        padding: 0;
        margin: 0;
    }

    & .__legend {
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        padding-bottom: 8px;
        color: #08474a;
        font-size: 34px;
        font-weight: 800;
        line-height: normal;

        &._icon::before {
            content: '';
            flex: 0 0 90px;
            width: 90px;
            height: 90px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
        }

        &._drop-off-icon::before {
            background-image: url('../../images/drop-off-icon.png');
        }

        &._pick-up-icon::before {
            background-image: url('../../images/pick-up-icon.png');
        }

        &._border-bottom {
            border-bottom: 1px solid #e5e5e5;
        }
    }

    & .__grid {
        display: grid;
        grid-template-columns: 100%;
        grid-gap: 24px;
        max-width: 900px;

        @media screen and (min-width: 526px) {
            grid-template-columns: 1fr 1fr;
        }
    }

    & .__group {
        position: relative;

        &._span-2 {
            @media screen and (min-width: 526px) {
                grid-column: span 2;
            }
        }

        input,
        textarea {
            font-size: 20px;
        }

        #boxes-delivery .contact-form-group:has(.form-label) .select2-selection .select2-selection__rendered {
            font-size: 20px;
        }
    }

    & .__radio-groups {
        display: grid;
        grid-gap: 12px;
        margin-bottom: 32px;
    }

    & .__body {
        padding-top: 24px;
    }
}

.boxes-order-table {
    margin-bottom: 50px;

    thead,
    tbody,
    tfoot,
    tr,
    table {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    table {
        border: 1px solid #e8e8e8;
        border-radius: 4px;
        overflow: hidden;
        border-collapse: collapse;
    }

    thead {
        background: #f4fbf8;
    }

    tr {
        display: flex;
        align-items: stretch;
        border-bottom: 1px solid #e8e8e8;
    }

    td,
    th {
        flex: 0 0 33.3%;
        display: flex;
        align-items: center;
        gap: 10px;
        color: rgba(37, 37, 39, 0.72);
        padding: 12px 24px;
        min-height: 80px;
        text-align: left;
        font-size: 18px;
        line-height: normal;
        font-weight: 700;
        min-width: 200px;

        @media (max-width: 525px) {
            padding: 8px 12px;
            min-height: 60px;
            min-width: 150px;
            font-size: 16px;
        }

        &:nth-child(2) {
            flex: 1 1 auto;
            min-width: 50px;
        }

        &:nth-child(3) {
            min-width: 100px;
        }

        img {
            flex: 0 0 56px;
            object-fit: contain;

            @media (max-width: 525px) {
                flex: 0 0 42px;
                width: 42px;
                height: auto;
            }
        }

        strong {
            color: #252527;
            font-weight: 600;
            line-height: 1.2;
        }

        small {
            color: #252527;
            font-size: 16px;
            font-weight: 400;
            line-height: 1.2;
        }

        .cost {
            display: block;
        }
    }

    th {
        color: #252527;
    }

    tfoot {
        th,
        td {
            font-size: 24px;
            color: #000;

            @media (max-width: 525px) {
                font-size: 20px;
            }
        }

        tr:last-child {
            border-bottom: none;
        }
    }

    & .__edit {
        flex: 1 1 100%;
        width: 100%;
        padding: 0;

        button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            min-height: 100%;
            padding: 24px;
            color: #01AF74;
            text-align: center;
            font-size: 18px;
            font-weight: 700;
            background: #F4FBF8;
            line-height: normal;
            cursor: pointer;
            border: none;
            transition: all 0.2s ease-in-out;

            @media (hover: hover) {
                &:hover {
                    color: #fff;
                    background: #01AF74;
                }
            }
        }
    }
}

@media screen and (max-width: 768px) {
    .section-title {
        margin-left: -12px;
        margin-right: -12px;
        padding-right: 48px;
        padding-left: 12px;

        &::before {
            right: 0;
        }

        &::after {
            translate: -70% 0;
        }
    }
}
