/*
 * Booking mobile-first.
 * Màu sắc dùng chung tinh thần với Admin V2.
 */
:root {
    --booking-red: #ba5a5a;
    --booking-yellow: #f7e49b;
    --booking-green: #a4ce8b;
    --booking-teal: #86bcbd;

    --booking-text: #281f2e;
    --booking-muted: #777180;
    --booking-surface: rgb(255 255 255 / 76%);
    --booking-border: rgb(186 90 90 / 20%);
    --booking-background: #fff9fa;
}

* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    min-width: 320px;
    margin: 0;

    color: var(--booking-text);

    background:
        radial-gradient(
            circle at 12% 10%,
            rgb(247 228 155 / 36%),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 22%,
            rgb(164 206 139 / 27%),
            transparent 28%
        ),
        radial-gradient(
            circle at 35% 88%,
            rgb(186 90 90 / 13%),
            transparent 34%
        ),
        var(--booking-background);
}

button {
    font: inherit;
}


.booking-shell {
    width: min(100%, 460px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 14px 40px;
}

.booking-header__brand {
    margin: 0 0 7px;

    color: var(--booking-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.booking-header h1 {
    margin: 0;

    font-size: clamp(28px, 7.5vw, 34px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.booking-guide {
    display: grid;
    gap: 4px;

    margin-top: 19px;
    padding: 13px 15px;

    background: var(--booking-surface);
    border: 1px solid var(--booking-border);
    border-radius: 18px;

    box-shadow: 0 14px 32px rgb(93 62 76 / 8%);
    backdrop-filter: blur(16px);
}

.booking-guide strong {
    font-size: 14px;
}

.booking-guide span {
    color: var(--booking-muted);
    font-size: 12px;
}

.booking-section {
    margin-top: 22px;
}

.booking-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 11px;
}

.booking-section__heading h2 {
    position: relative;

    display: inline-block;
    margin: 0;
    padding-bottom: 5px;

    color: #332532;
    font-size: 20px;
    letter-spacing: -0.025em;
}



.booking-section__heading > span {
    color: var(--booking-muted);
    font-size: 12px;
}

.booking-message {
    grid-column: 1 / -1;

    margin: 0;
    padding: 20px;

    color: var(--booking-muted);
    text-align: center;
}


.service-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.service-option {
     position: relative;

    display: grid;
    align-content: center;
    gap: 4px;

    min-height: 56px;
    padding: 11px 12px;

    color: var(--booking-text);
    text-align: left;

    background: var(--booking-surface);
    border: 1px solid rgb(186 90 90 / 18%);
    border-radius: 17px;

    box-shadow: 0 9px 22px rgb(93 62 76 / 7%);
    backdrop-filter: blur(14px);

    cursor: pointer;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease;
}

.service-option:active {
    transform: scale(0.98);
}

.service-option__name {
    padding-right: 22px;

    font-size: 14px;
    font-weight: 700;
}


.service-option__check {
    position: absolute;
    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    display: none;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    color: #fff;
    background: var(--booking-red);
    border-radius: 50%;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.service-option.is-selected {
    background: rgb(186 90 90 / 11%);
    border-color: var(--booking-red);
    box-shadow: 0 10px 25px rgb(186 90 90 / 15%);
}

.service-option.is-selected .service-option__check {
    display: flex;
}

.service-option:focus-visible {
    outline: 3px solid rgb(134 188 189 / 35%);
    outline-offset: 2px;
}

/* =========================================================
   CHỌN NGÀY
   ========================================================= */

.date-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
}

#date-month-label {
    margin-right: 2px;

    color: var(--booking-muted);
    font-size: 12px;
    white-space: nowrap;
}

.date-navigation__button {
    display: grid;
    place-items: center;

    width: 32px;
    height: 32px;
    padding: 0;

    color: var(--booking-red);
    background: var(--booking-surface);
    border: 1px solid var(--booking-border);
    border-radius: 11px;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}

.date-navigation__button:disabled {
    color: #aaa5ac;
    background: rgb(255 255 255 / 45%);
    cursor: not-allowed;
    opacity: 0.6;
}

.date-navigation__button:not(:disabled):active {
    transform: scale(0.95);
}

.date-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.date-option {
    display: grid;
    justify-items: center;
    gap: 3px;

    min-width: 0;
    min-height: 82px;
    padding: 9px 3px;

    color: var(--booking-text);
    background: var(--booking-surface);
    border: 1px solid var(--booking-border);
    border-radius: 15px;

    box-shadow: 0 8px 20px rgb(93 62 76 / 6%);

    cursor: pointer;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease;
}

.date-option:active {
    transform: scale(0.97);
}

.date-option__weekday {
    color: var(--booking-muted);
    font-size: 10px;
    white-space: nowrap;
}

.date-option__day {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.date-option__month {
    color: var(--booking-muted);
    font-size: 10px;
}

.date-option.is-selected {
    color: #fff;
    background: linear-gradient(
        145deg,
        #d96b86,
        #ba5a5a
    );
    border-color: var(--booking-red);
    box-shadow: 0 10px 24px rgb(186 90 90 / 22%);
}

.date-option.is-selected .date-option__weekday,
.date-option.is-selected .date-option__month {
    color: rgb(255 255 255 / 82%);
}

.date-option:focus-visible,
.date-navigation__button:focus-visible {
    outline: 3px solid rgb(134 188 189 / 35%);
    outline-offset: 2px;
}

/*
 * Màn hình rất nhỏ vẫn giữ đủ 5 ngày,
 * chỉ giảm nhẹ khoảng cách và kích thước.
 */
@media (max-width: 360px) {
    .date-options {
        gap: 5px;
    }

    .date-option {
        min-height: 76px;
        padding-inline: 2px;
    }

    .date-option__day {
        font-size: 18px;
    }

    #date-month-label {
        display: none;
    }
}


/* =========================================================
   CHỌN GIỜ
   ========================================================= */

.time-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.time-option {
    min-height: 48px;
    padding: 9px 6px;

    color: var(--booking-text);
    background: var(--booking-surface);
    border: 1px solid var(--booking-border);
    border-radius: 14px;

    font-size: 14px;
    font-weight: 650;

    box-shadow: 0 7px 18px rgb(93 62 76 / 5%);

    cursor: pointer;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease;
}

.time-option:not(:disabled):active {
    transform: scale(0.97);
}

.time-option.is-selected {
    color: var(--booking-red);
    background: rgb(186 90 90 / 12%);
    border-color: var(--booking-red);
    box-shadow: 0 9px 20px rgb(186 90 90 / 14%);
}

.time-option:disabled {
    color: #aaa4ab;

    background:
        repeating-linear-gradient(
            -45deg,
            rgb(255 255 255 / 50%),
            rgb(255 255 255 / 50%) 6px,
            rgb(186 90 90 / 5%) 6px,
            rgb(186 90 90 / 5%) 12px
        );

    border-style: dashed;
    cursor: not-allowed;
    opacity: 0.72;
}

.time-option:focus-visible {
    outline: 3px solid rgb(134 188 189 / 35%);
    outline-offset: 2px;
}

/*
 * Thông báo giới hạn dịch vụ hoặc ngày đã hết chỗ.
 */
.booking-message--notice {
    color: #6b5723;
    background: rgb(247 228 155 / 32%);
    border: 1px solid rgb(213 167 52 / 30%);
    border-radius: 14px;
}

.booking-message--closed {
    color: var(--booking-red);
    background: rgb(186 90 90 / 8%);
    border: 1px solid rgb(186 90 90 / 18%);
    border-radius: 14px;
}

.booking-message--error {
    color: #8c3f3f;
    background: rgb(186 90 90 / 9%);
    border-radius: 14px;
}

/* =========================================================
   XÁC NHẬN LỰA CHỌN
   ========================================================= */

.booking-summary {
    margin-top: 22px;
    padding: 15px;

    background: var(--booking-surface);
    border: 1px solid var(--booking-border);
    border-radius: 21px;

    box-shadow: 0 14px 32px rgb(93 62 76 / 9%);
    backdrop-filter: blur(16px);
}

.booking-summary h2 {
    margin: 0 0 12px;

    font-size: 17px;
    letter-spacing: -0.02em;
}

.booking-summary__details {
    display: grid;
    gap: 0;

    margin: 0 0 13px;

    overflow: hidden;

    background: rgb(255 255 255 / 58%);
    border: 1px solid rgb(186 90 90 / 11%);
    border-radius: 15px;
}

.booking-summary__row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 10px;

    min-height: 48px;
    padding: 10px 12px;
}

.booking-summary__row + .booking-summary__row {
    border-top: 1px solid rgb(186 90 90 / 10%);
}

.booking-summary__row dt {
    color: var(--booking-muted);
    font-size: 12px;
}

.booking-summary__row dd {
    min-width: 0;
    margin: 0;

    color: var(--booking-red);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.booking-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 50px;
    padding: 11px 16px;

    color: #fff;
    background: linear-gradient(
        135deg,
        #d86b84,
        var(--booking-red)
    );

    border: 1px solid var(--booking-red);
    border-radius: 15px;

    font-size: 14px;
    font-weight: 750;

    box-shadow: 0 10px 22px rgb(186 90 90 / 20%);
    cursor: pointer;

    transition:
        transform 140ms ease,
        opacity 140ms ease;
}

.booking-continue:not(:disabled):active {
    transform: scale(0.98);
}

.booking-continue:disabled {
    color: #99949b;
    background: #e5e2e4;
    border-color: #d8d4d7;
    box-shadow: none;

    cursor: not-allowed;
    opacity: 0.78;
}

.booking-summary__privacy {
    margin: 10px 0 0;

    color: var(--booking-muted);
    font-size: 11px;
    text-align: center;
}

/* =========================================================
   MODAL THÔNG TIN KHÁCH
   ========================================================= */

/*
 * Class .customer-modal có display: grid nên cần đảm bảo
 * thuộc tính hidden luôn thắng khi modal đang đóng.
 */
.customer-modal[hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.customer-modal {
    position: fixed;
    z-index: 100;
    inset: 0;

    display: grid;
    align-items: end;
}

.customer-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgb(40 31 46 / 42%);
    backdrop-filter: blur(4px);
}

.customer-modal__dialog {
    position: relative;
    z-index: 1;

    width: 100%;
    max-height: calc(100vh - 20px);
    overflow-y: auto;

    background:
        linear-gradient(
            145deg,
            rgb(255 255 255 / 96%),
            rgb(255 247 249 / 94%)
        );

    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 24px 24px 0 0;

    box-shadow: 0 -18px 50px rgb(40 31 46 / 22%);
}

.customer-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    padding: 17px 17px 13px;
    border-bottom: 1px solid var(--booking-border);
}

.customer-modal__header span {
    color: var(--booking-red);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.customer-modal__header h2 {
    margin: 4px 0 0;

    font-size: 20px;
    letter-spacing: -0.03em;
}

.customer-modal__close {
    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;
    padding: 0;

    color: var(--booking-text);
    background: rgb(164 206 139 / 20%);
    border: 0;
    border-radius: 12px;

    font-size: 22px;
    cursor: pointer;
}

.customer-modal__body {
    padding: 15px 17px 8px;
}

.customer-modal__help {
    margin: 0 0 14px;

    color: var(--booking-muted);
    font-size: 12px;
    line-height: 1.5;
}

.customer-fields {
    display: grid;
    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 1fr);
    gap: 9px;
}

.customer-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.customer-field span {
    color: var(--booking-text);
    font-size: 11px;
    font-weight: 650;
}

.customer-field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 9px 10px;

    color: var(--booking-text);
    background: rgb(255 255 255 / 80%);
    border: 1px solid rgb(186 90 90 / 22%);
    border-radius: 12px;

    font: inherit;
    /*
    * iOS Safari tự zoom nếu input nhỏ hơn 16px.
    */
    font-size: 16px;
}

.customer-field input:focus {
    border-color: var(--booking-teal);
    outline: 3px solid rgb(134 188 189 / 24%);
}

.customer-form-error {
    margin: 11px 0 0;
    padding: 9px 10px;

    color: #8c3f3f;
    background: rgb(186 90 90 / 9%);
    border-radius: 10px;

    font-size: 12px;
}

.customer-modal__footer {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(165px, 1.2fr);
    justify-content: stretch;
    gap: 10px;

    padding: 12px 17px 18px;
}

.customer-modal__back,
.customer-modal__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;
    padding: 11px 16px;

    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.customer-modal__back {
    color: var(--booking-text);
    background: #fff;
    border: 1px solid #d8d4d7;
}

.customer-modal__submit {
    color: #fff;
    background: var(--booking-red);
    border: 1px solid var(--booking-red);
}

.customer-modal__submit:disabled {
    color: #969197;
    background: #ddd9dc;
    border-color: #d3cfd2;
    cursor: not-allowed;
}

@media (min-width: 520px) {
    .customer-modal {
        align-items: center;
        justify-items: center;
        padding: 20px;
    }

    .customer-modal__dialog {
        width: min(440px, 100%);
        border-radius: 22px;
    }
}

@media (max-width: 350px) {
    .customer-fields {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ĐẶT LỊCH THÀNH CÔNG
   ========================================================= */

.customer-booking-success[hidden] {
    display: none !important;
}

.customer-booking-success {
    display: grid;
    justify-items: center;

    padding: 24px 18px 22px;
    text-align: center;
}

.customer-booking-success__check {
    display: grid;
    place-items: center;

    width: 58px;
    height: 58px;
    margin-bottom: 13px;

    color: #fff;
    background: var(--booking-green);
    border-radius: 50%;

    box-shadow: 0 12px 28px rgb(164 206 139 / 35%);

    font-size: 28px;
    font-weight: 800;
}

.customer-booking-success h3 {
    margin: 0;

    font-size: 21px;
    letter-spacing: -0.03em;
}

.customer-booking-success > p {
    margin: 7px 0 16px;

    color: var(--booking-muted);
    font-size: 12px;
}

.customer-booking-success__details {
    width: 100%;
    margin: 0 0 16px;

    overflow: hidden;

    background: rgb(164 206 139 / 14%);
    border: 1px solid rgb(164 206 139 / 55%);
    border-radius: 15px;
}

.customer-booking-success__details > div {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 10px;

    min-height: 47px;
    padding: 9px 12px;
}

.customer-booking-success__details > div + div {
    border-top: 1px solid rgb(164 206 139 / 40%);
}

.customer-booking-success__details dt {
    color: var(--booking-muted);
    font-size: 11px;
    text-align: left;
}

.customer-booking-success__details dd {
    margin: 0;

    color: #477f42;
    font-size: 13px;
    font-weight: 750;
    text-align: right;
}

.customer-booking-success .customer-modal__submit {
    width: 100%;
}
