h1 {
    display: none;
}
.page-box {
    display: grid;
    grid-template-columns: 432px 1fr;
    align-items: start;
    gap: 30px;
}
aside {
    position: sticky;
    top: 20px;
    border-radius: 20px;
    background: var(--white);
    padding: 30px;
    display: flex;
    flex-direction: column;
    h2 {
        color: var(--grey);
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 0.6px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 20px;
        &::before {
            content: '\e91f';
            font: 100 32px/1 icon;
            color: var(--blue);
            padding: 9px;
            border-radius: 16px;
            background: var(--grey-white);
        }
    }
    nav {
        display: flex;
        flex-direction: column;
        a {
            color: var(--grey);
            font-weight: 500;
            letter-spacing: 0.48px;
            border-radius: 12px;
            padding: 10px;
            &.selected {
                background-color: var(--border);
                color: var(--white);
            }
        }
    }
}
.right {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    > div:not(.window-modal, .table) {
        border-radius: 20px;
        background: var(--white);
        padding: 30px;
        > p {
            color: var(--grey);
            font-size: 24px;
            letter-spacing: 0.72px;
            margin-top: 20px;
            + :where(button, a) {
                width: fit-content;
                margin-top: 30px;
            }
        }
    }
    h2 {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
        color: var(--grey);
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 0.72px;
        &::before {
            font: 100 32px/1 icon;
            color: var(--blue);
        }
    }
    .green-btn {
        padding-inline: 30px;
    }
    .window-modal .window-body {
        padding: 60px;
        width: min(620px, calc(100vw - 20px));
        h2 {
            margin-bottom: 40px;
        }
        form {
            width: 100%;
            input,
            textarea {
                width: 100%;
                background: var(--white);
                border: 1px solid var(--line);
                &:-webkit-autofill {
                    box-shadow: inset 0 0 0 50px var(--white) !important;
                }
            }
            label {
                margin-bottom: 20px;
                span {
                    color: inherit;
                    font-size: inherit;
                    line-height: inherit;
                    &::after {
                        content: '*';
                        color: var(--error);
                        font-size: inherit;
                    }
                }
            }
            > button {
                margin-top: 50px;
                margin-bottom: 0;
            }
        }
    }
    .addresses-modal .window-body {
        width: min(900px, calc(100vw - 20px));
        form {
            max-height: calc(100dvh - 146px);
            overflow-y: auto;
        }
        fieldset {
            border: none;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px 10px;
            margin-bottom: 20px;
            + fieldset {
                grid-template-columns: repeat(3, 1fr);
            }
            label {
                margin-bottom: 0;
                &:has(input[name="address-name"]) {
                    grid-column: 1/-1;
                }
            }
        }
        textarea {
            min-height: 100px;
        }
    }
    .remove-addresses-modal .window-body {
        width: min(370px, calc(100vw - 20px));
        padding: 40px 20px;
        h2 {
            margin-bottom: 20px;
        }
        .buttons {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            .green-btn {
                margin: 0;
                font-weight: 800;
            }
            button:not(.green-btn) {
                display: flex;
                justify-content: center;
                align-items: center;
                min-height: 50px;
                color: var(--blue);
                font-weight: 800;
                border-radius: 16px;
                border: 1px solid var(--blue);
                transition: color .2s linear, border-color .2s linear;
            }
        }
    }
}
:where(.profile-modal, .profile) h2::before {
    content: '\e934';
}
:where(.addresses-modal, .addresses) h2::before {
    content: '\e929';
}
.password-modal h2::before {
    content: '\e934';
}
.profile {
    .info-box {
        display: flex;
        flex-direction: column;
        gap: 16px;
        > div {
            display: grid;
            grid-template-columns: auto 1fr auto;
            color: var(--text);
            font-weight: 500;
            letter-spacing: 0.48px;
            span {
                color: var(--grey);
                font-weight: 700;
                letter-spacing: 0.48px;
                grid-column: 3/4;
            }
            &::after {
                content: '';
                grid-column: 2/3;
                width: 100%;
                height: 100%;
                border-bottom: 1px dashed var(--line);
            }
        }
    }
    .green-btn {
        margin-top: 30px;
        background-color: var(--white);
        color: var(--blue);
        border: 1px solid var(--blue);
    }
}
.orders {
    width: 100%;
    h2 {
        margin-bottom: 0;
        &::before {
            content: '\e91e';
        }
    }
    + .table {
        display: flex;
        flex-direction: column;
        .head {
            position: relative;
            z-index: 1;
            border-radius: 20px 20px 0 0;
            display: grid;
            grid-template-columns: repeat(4, 220px) 1fr;
            background: var(--white);
            box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.05);
            padding: 22px 30px 21px;
            p {
                color: var(--text);
                font-size: 14px;
                letter-spacing: 0.42px;
            }
        }
        .t-body {
            overflow-x: auto;
            padding-bottom: 10px;
            + label {
                position: relative;
                min-height: 50px;
                width: fit-content;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-top: 20px;
                padding-inline: 30px;
                border-radius: 16px;
                font-weight: 800;
                border: 1px solid var(--blue);
                color: var(--blue);
                cursor: pointer;
                transition: background-color .2s linear, color .2s linear;
                input {
                    position: absolute;
                    z-index: -10;
                    opacity: 0;
                }
            }
            &:has(+ label input:checked) {
                .body:has(+ .sub-list) > div:last-child {
                    border-radius: 0;
                }
                .sub-list {
                    grid-template-rows: 1fr;
                }
            }
        }
        .body {
            overflow: hidden;
            > div {
                padding: 20px 30px;
                display: grid;
                grid-template-columns: repeat(4, 220px) 1fr;
                &:nth-child(odd) {
                    background: var(--white);
                }
                &:nth-child(even) {
                    background: var(--table-bg);
                }
                &:last-child {
                    border-radius: 0 0 20px 20px;
                }
            }
            p {
                color: var(--grey);
                font-weight: 700;
                letter-spacing: 0.48px;
            }
            .id,
            button {
                color: var(--blue);
            }
            button {
                font-weight: 800;
                margin-left: auto;
            }
        }
        .sub-list {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows .5s linear;
        }
    }
}
.addresses h2 {
    margin-bottom: 0;
}
.address-item {
    .address-name {
        color: var(--blue);
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 0.6px;
        margin-bottom: 20px;
    }
    .address,
    .comment {
        color: var(--grey);
        font-weight: 700;
        letter-spacing: 0.48px;
        margin-bottom: 10px;
    }
    div:has(.entrance, .floor, .room) {
        display: grid;
        grid-template-columns: auto 1fr auto;
        color: var(--text);
        font-weight: 500;
        letter-spacing: 0.48px;
        margin-bottom: 16px;
        span {
            color: var(--grey);
            font-weight: 700;
            letter-spacing: 0.48px;
            grid-column: 3/4;
        }
        &::after {
            content: '';
            grid-column: 2/3;
            width: 100%;
            height: 100%;
            border-bottom: 1px dashed var(--line);
        }
    }
    div:has(.comment) {
        display: flex;
        flex-direction: column;
        color: var(--text);
        font-weight: 500;
        letter-spacing: 0.48px;
        .comment {
            margin-bottom: 0;
        }
    }
    .buttons {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 20px;
        button {
            color: var(--blue);
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 0.42px;
        }
    }
}
.page-box,
.wrapper:has(.advantages) {
    margin-bottom: 120px;
}
.window-modal.order-modal {
    .window-body {
        width: min(900px, 100vw);
        max-height: 100dvh;
    }
    h2 {
        display: flex;
        align-items: center;
        color: var(--grey);
        text-align: center;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 0.72px;
        padding: 9px 0;
        margin-bottom: 30px;
        &::before {
            content: '\e91e';
            display: inline-block;
            font: 100 32px/1 icon;
            color: var(--blue);
            margin-right: 10px;
        }
        span {
            letter-spacing: inherit;
            font-size: inherit;
            font-weight: inherit;
            color: var(--blue);
        }
    }
    .items {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
        width: 100%;
        padding-right: 10px;
        max-height: 400px;
        margin-bottom: 20px;
        .product-item {
            padding: 20px;
            border-radius: 20px;
            display: flex;
            gap: 20px;
            border: 1px solid var(--line);
            background: var(--white);
            img {
                display: inline-block;
                aspect-ratio: 1;
                width: 80px;
                border-radius: 16px;
            }
            .info {
                display: flex;
                flex-direction: column;
                gap: 4px;
                .head {
                    overflow: hidden;
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 1;
                    line-clamp: 1;
                    color: var(--grey);
                    font-size: 24px;
                    font-weight: 700;
                    letter-spacing: 0.72px;
                    margin-bottom: 6px;
                }
                p {
                    color: var(--grey);
                    font-weight: 500;
                }
                .color {
                    color: var(--text);
                    font-weight: 400;
                    span {
                        color: var(--grey);
                        font-weight: 500;
                    }
                }
            }
            .price {
                display: flex;
                flex-direction: column;
                margin: auto 0 auto auto;
                white-space: nowrap;
                gap: 4px;
                color: var(--grey);
                font-size: 20px;
                font-weight: 700;
                span {
                    color: var(--grey);
                    font-size: 16px;
                    font-weight: 500;
                }
            }
        }
    }
    .result {
        width: 100%;
        color: var(--grey);
        font-size: 20px;
        letter-spacing: 0.6px;
        margin-bottom: 20px;
        span {
            color: inherit;
            font-size: inherit;
            font-weight: 700;
            letter-spacing: inherit;
            display: inline-block;
            margin-left: 10px;
        }
    }
    .info-box {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
        > div {
            display: grid;
            grid-template-columns: auto 1fr auto;
            color: var(--text);
            letter-spacing: 0.48px;
            span {
                color: var(--grey);
                font-weight: 700;
                letter-spacing: 0.48px;
                grid-column: 3/4;
            }
            &::after {
                content: '';
                grid-column: 2/3;
                width: 100%;
                height: 100%;
                border-bottom: 1px dashed var(--line);
            }
        }
    }
    .green-btn {
        background-color: var(--no-color);
        color: var(--blue);
        border: 1px solid var(--blue);
        cursor: pointer;
        transition: background-color .2s linear, color .2s linear;
    }
}

@media screen and (max-width: 1860px) {
    .page-box {
        grid-template-columns: 380px 1fr;
        gap: 20px;
        .right {
            gap: 20px;
        }
    }
    .orders + .table {
        .body > div,
        .head {
            grid-template-columns: repeat(4, 180px) 1fr;
        }
    }
}
@media screen and (max-width: 1500px) {
    aside {
        padding: 20px;
        h2 {
            font-size: 18px;
        }
    }
    .right > div:not(.window-modal, .table) {
        padding: 20px;
    }
    .page-box {
        grid-template-columns: 340px 1fr;
        gap: 10px;
        .right {
            gap: 10px;
        }
    }
    .page-box,
    .wrapper:has(.advantages) {
        margin-bottom: 100px;
    }
}
@media screen and (max-width: 1280px) {
    aside h2 {
        font-size: 16px;
    }
    .page-box {
        grid-template-columns: 320px calc(100% - 330px);
    }
    .orders + .table {
        .body,
        .head {
            min-width: 876px;
        }
    }
    .advantages {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        > div:nth-child(3)::after {
            display: none;
        }
    }
    .page-box,
    .wrapper:has(.advantages) {
        margin-bottom: 80px;
    }
}
@media screen and (max-width: 992px) {
    aside {
        position: static;
        width: 100%;
    }
    .page-box {
        display: flex;
        flex-direction: column;
    }
    .right h2 {
        font-size: 20px;
    }
    .orders + .table .t-body + label {
        margin-top: 10px;
    }
}
@media screen and (max-width: 768px) {
    .right {
        > div:not(.window-modal, .table) > p {
            font-size: 16px;
            + :where(button, a) {
                margin-top: 20px;
            }
        }
        .window-modal .window-body {
            padding: 40px 20px;
            h2 {
                margin-bottom: 20px;
            }
            form {
                label {
                    margin-bottom: 10px;
                }
                button {
                    margin-top: 40px;
                }
            }
        }
        .addresses-modal .window-body fieldset {
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            label {
                margin-bottom: 0;
            }
        }
    }
    .profile .info-box {
        gap: 10px;
        > div {
            display: flex;
            flex-direction: column;
            font-size: 14px;
            &::after {
                display: none;
            }
        }
    }
    .address-item div:has(.entrance, .floor, .room) {
        display: flex;
        flex-direction: column;
        font-size: 14px;
        margin-bottom: 10px;
        &::after {
            display: none;
        }
    }
    .window-modal.order-modal {
        .window-body {
            padding: 40px 20px;
        }
        h2 {
            font-size: 20px;
            letter-spacing: 0.6px;
            padding: 4px 0;
        }
        .items .product-item {
            padding: 10px;
            display: grid;
            grid-template-columns: 80px 1fr;
            img {
                grid-row: 1/3;
                width: 100%;
                align-self: start;
            }
            .info {
                .head {
                    font-size: 16px;
                    letter-spacing: 0.48px;
                }
            }
            .price {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                margin: 0;
                gap: 10px;
            }
        }
        .info-box {
            gap: 10px;
            > div {
                display: flex;
                flex-direction: column;
                font-size: 14px;
                &::after {
                    display: none;
                }
            }
        }
    }
    .page-box,
    .wrapper:has(.advantages) {
        margin-bottom: 60px;
    }
    .advantages {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
        div:not(:first-child) {
            padding-top: 30px;
            border-top: 1px solid var(--brjyrb);
            &::after {
                display: none;
            }
        }
        .head {
            font-size: 20px;
        }
        p {
            font-size: 14px;
        }
    }
}
@media screen and (hover:hover) {
    .orders + .table .t-body + label:hover {
        color: var(--white);
        background-color: var(--blue);
    }
    .right .remove-addresses-modal .window-body .buttons button:not(.green-btn):hover {
        color: var(--orange);
        border-color: var(--orange)
    }
    .window-modal.order-modal .green-btn:hover {
        color: var(--white);
        background-color: var(--blue);
    }
    .profile .green-btn:hover {
        background-color: var(--blue);
        color: var(--white);
    }
    .address-item .buttons button:hover,
    aside nav a:not(.selected):hover {
        color: var(--orange);
    }
}