body.master-modal-open {
    overflow: hidden;
}

.master-booking-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(24, 20, 15, .68);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.master-booking-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.master-booking-modal {
    position: relative;
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(201, 169, 110, .34);
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(15, 12, 8, .32);
    transform: translateY(24px) scale(.985);
    transition: transform .3s ease;
}

.master-booking-overlay[aria-hidden="false"] .master-booking-modal {
    transform: translateY(0) scale(1);
}

.master-booking-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: #4c4438;
    font-size: 17px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e7dfd3;
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(31, 25, 18, .12);
    cursor: pointer;
}

.master-booking-close:hover {
    background: #f7f1e7;
}

.master-booking-loading {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #766f65;
}

.master-booking-spinner {
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border: 3px solid #eee4d4;
    border-top-color: #a98548;
    border-radius: 50%;
    animation: master-booking-spin .75s linear infinite;
}

@keyframes master-booking-spin {
    to { transform: rotate(360deg); }
}

.master-booking-content {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    min-height: 640px;
}

.master-booking-content[hidden],
.master-booking-success[hidden],
.master-booking-loading[hidden] {
    display: none;
}

.master-booking-profile {
    padding: 38px 32px;
    color: #fff;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .16), transparent 35%),
        linear-gradient(155deg, #3a3329, #201c17);
}

.master-booking-profile > img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 26px;
    padding: 0;
    object-fit: cover;
    background: #efe5d5;
    border: 4px solid rgba(255, 255, 255, .18);
    border-radius: 24px;
}

.master-booking-profile > img.is-placeholder {
    padding: 25%;
    object-fit: contain;
}

.master-booking-kicker,
.master-booking-flow-heading > span {
    display: block;
    margin-bottom: 8px;
    color: #d4b578;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.master-booking-profile h2 {
    margin: 0;
    font-size: 29px;
    line-height: 1.18;
}

.master-booking-contacts {
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.master-booking-contacts > div {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.master-booking-contacts span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
}

.master-booking-contacts a {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.master-booking-contacts a[href]:hover {
    color: #e3c486;
}

.master-booking-flow {
    padding: 42px 42px 36px;
}

.master-booking-flow-heading {
    padding-right: 38px;
    margin-bottom: 28px;
}

.master-booking-flow-heading h3 {
    margin: 0;
    color: #2c271f;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.15;
}

.master-booking-step {
    min-width: 0;
}

.master-booking-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}

.master-booking-step-title > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #765725;
    font-size: 12px;
    font-weight: 800;
    background: #f0e4cf;
    border-radius: 50%;
}

.master-booking-step-title h4 {
    margin: 0;
    color: #383128;
    font-size: 17px;
}

.master-service-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: 255px;
    padding: 2px 4px 4px 2px;
    overflow-y: auto;
}

.master-service-option {
    min-width: 0;
    padding: 14px;
    color: #393229;
    font: inherit;
    text-align: left;
    background: #fff;
    border: 1px solid #e2d9cd;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.master-service-option:hover {
    border-color: #b89355;
    transform: translateY(-1px);
}

.master-service-option.is-selected {
    background: #faf5eb;
    border-color: #a98548;
    box-shadow: 0 0 0 2px rgba(169, 133, 72, .13);
}

.master-service-category {
    display: block;
    margin-bottom: 5px;
    color: #9a7a43;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.master-service-title {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.master-service-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #7d756b;
    font-size: 12px;
}

.master-service-price {
    color: #2f2a23;
    font-size: 14px;
    font-weight: 800;
}

.master-service-old-price {
    margin-right: 5px;
    color: #9d958a;
    font-size: 11px;
    font-weight: 400;
    text-decoration: line-through;
}

.master-booking-date-time {
    display: grid;
    grid-template-columns: minmax(190px, .8fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-top: 26px;
}

.master-booking-date-button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: #4a4033;
    font: inherit;
    font-weight: 700;
    background: #fff;
    border: 1px dashed #b69050;
    border-radius: 13px;
    cursor: pointer;
}

.master-booking-date-button:disabled {
    color: #aaa197;
    background: #f6f4f1;
    border-color: #d9d4cc;
    cursor: not-allowed;
}

.master-booking-date-button.is-selected {
    background: #faf5eb;
    border-style: solid;
}

.master-booking-date-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.master-booking-slots {
    display: flex;
    min-height: 48px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.master-booking-slot {
    min-width: 64px;
    padding: 9px 10px;
    color: #4a4033;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border: 1px solid #ddd5c9;
    border-radius: 10px;
    cursor: pointer;
}

.master-booking-slot:hover,
.master-booking-slot.is-selected {
    color: #fff;
    background: #a98548;
    border-color: #a98548;
}

.master-booking-placeholder,
.master-booking-empty {
    color: #968e83;
    font-size: 13px;
    line-height: 1.4;
}

.master-booking-status {
    min-height: 20px;
    margin: 18px 0 8px;
    color: #7c7469;
    font-size: 13px;
}

.master-booking-status.is-error {
    color: #a23d34;
}

.master-booking-submit {
    width: 100%;
    min-height: 52px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, #c9a96e, #9e7533);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(158, 117, 51, .25);
    cursor: pointer;
}

.master-booking-submit:disabled {
    color: #aaa39a;
    background: #e9e5df;
    box-shadow: none;
    cursor: not-allowed;
}

.master-booking-success {
    min-height: 520px;
    padding: 60px 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.master-booking-success:not([hidden]) {
    display: flex;
}

.master-booking-success img {
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
}

.master-booking-success > span {
    color: #a17d3d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.master-booking-success h3 {
    margin: 10px 0;
    color: #2d2821;
    font-size: 32px;
}

.master-booking-success p {
    max-width: 520px;
    margin: 0 0 28px;
    color: #746d63;
    line-height: 1.6;
}

.master-booking-success button {
    min-width: 180px;
    padding: 13px 22px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    background: #a98548;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.master-prepayment-summary{
    width:min(100%,520px);
    padding:16px;
    border:1px solid #e4d0ad;
    border-radius:15px;
    color:#5b5043;
    background:#fff8eb;
    text-align:left;
}

.master-prepayment-summary p{margin:0 0 10px}

.master-prepayment-summary a{
    color:#7c5722;
    font-weight:800;
    text-decoration:underline;
    text-underline-offset:3px;
}

.master-prepayment-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:15px;
}

.master-prepayment-actions button{
    width:100%;
    margin:0;
}

.master-prepayment-actions button:last-child{
    color:#fff;
    background:#9b7436;
}

.master-prepayment-error{
    margin:12px 0 0!important;
    color:#b13030!important;
    font-weight:700;
}

@media(max-width:560px){
    .master-prepayment-actions{grid-template-columns:1fr}
}

.flatpickr-calendar.master-booking-calendar {
    z-index: 7000;
}

.master-booking-certificate{
    display:grid;
    gap:10px;
}

.master-booking-certificate>p{
    margin:0;
    color:#786b5d;
    font-size:13px;
    line-height:1.45;
}

.master-booking-certificate select,
.master-booking-certificate input{
    width:100%;
    min-height:46px;
    padding:11px 13px;
    border:1px solid #ded2c2;
    border-radius:12px;
    color:#3d342b;
    background:#fff;
    font:inherit;
    outline:none;
}

.master-booking-certificate select:focus,
.master-booking-certificate input:focus{
    border-color:#aa8245;
    box-shadow:0 0 0 3px rgba(170,130,69,.13);
}

.master-booking-certificate-divider{
    display:flex;
    align-items:center;
    gap:10px;
    color:#9a8c7d;
    font-size:12px;
}

.master-booking-certificate-divider::before,
.master-booking-certificate-divider::after{
    content:"";
    flex:1;
    height:1px;
    background:#e8ded1;
}

.master-booking-certificate .master-booking-certificate-hint{
    padding:9px 11px;
    border-radius:10px;
    color:#705329;
    background:#f8f0e4;
}

@media (max-width: 860px) {
    .master-booking-content {
        grid-template-columns: 1fr;
    }

    .master-booking-profile {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);
        column-gap: 24px;
        align-items: center;
        padding: 28px;
    }

    .master-booking-profile > img {
        grid-row: 1 / 4;
        margin: 0;
    }

    .master-booking-contacts {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin-top: 22px;
    }
}

@media (max-width: 640px) {
    .master-booking-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .master-booking-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
    }

    .master-booking-profile,
    .master-booking-flow {
        padding: 24px 20px;
    }

    .master-booking-profile {
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 16px;
    }

    .master-booking-profile h2 {
        padding-right: 35px;
        font-size: 23px;
    }

    .master-booking-contacts,
    .master-booking-date-time,
    .master-service-options {
        grid-template-columns: 1fr;
    }

    .master-service-options {
        max-height: 300px;
    }

    .master-booking-flow-heading {
        padding-right: 20px;
    }
}
