.cwms-booking-modal[hidden],
.cwms-booking-summary[hidden],
.cwms-booking-summary__item[hidden],
.cwms-booking-form__message[hidden] {
    display: none !important;
}

.cwms-booking-modal-open {
    overflow: hidden;
}

.cwms-booking-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cwms-booking-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .58);
}

.cwms-booking-modal__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(90vh, 840px);
    overflow: auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .25);
}

.cwms-booking-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.cwms-booking-form {
    padding: 32px;
}

.cwms-booking-form__header {
    padding-right: 40px;
    margin-bottom: 20px;
}

.cwms-booking-form__title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.cwms-booking-form__intro {
    margin: 0;
    color: #64748b;
}

.cwms-booking-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.cwms-booking-summary__item span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 3px;
}

.cwms-booking-summary__item strong {
    display: block;
    color: #0f172a;
}

.cwms-booking-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cwms-booking-field {
    display: block;
}

.cwms-booking-field--full {
    grid-column: 1 / -1;
}

.cwms-booking-field span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #0f172a;
}

.cwms-booking-field em {
    color: #dc2626;
    font-style: normal;
}

.cwms-booking-field input,
.cwms-booking-field textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.cwms-booking-field textarea {
    resize: vertical;
}

.cwms-booking-consents {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    font-size: 14px;
    color: #334155;
}

.cwms-booking-consents label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cwms-booking-consents input {
    margin-top: 3px;
}

.cwms-booking-consent {
    position: relative;
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.45;
}

.cwms-booking-consent__input {
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    z-index: 2 !important;
    cursor: pointer !important;
}

.cwms-booking-consent__box {
    width: 22px;
    height: 22px;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    box-shadow: inset 0 0 0 2px #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.cwms-booking-consent__input:focus + .cwms-booking-consent__box {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12), inset 0 0 0 2px #fff;
}

.cwms-booking-consent__input:checked + .cwms-booking-consent__box {
    border-color: #4f46e5;
    background: #4f46e5;
}

.cwms-booking-consent__input:checked + .cwms-booking-consent__box::after {
    content: "";
    display: block;
    width: 7px;
    height: 12px;
    margin: 2px auto 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cwms-booking-consent__text {
    display: block;
    min-width: 0;
}

.cwms-booking-consent__text a {
    color: #4f46e5;
    text-decoration: none;
}

.cwms-booking-consent__text a:hover {
    text-decoration: underline;
}

.cwms-booking-form--invalid-consents .cwms-booking-consent__box {
    border-color: #dc2626;
}

.cwms-booking-form__message {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.cwms-booking-form__message--success {
    background: #dcfce7;
    color: #166534;
}

.cwms-booking-form__message--error {
    background: #fee2e2;
    color: #991b1b;
}

.cwms-booking-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.cwms-booking-form__submit:disabled {
    opacity: .7;
    cursor: progress;
}

.cwms-booking-inline {
    max-width: 760px;
}

@media (max-width: 700px) {
    .cwms-booking-modal {
        align-items: flex-end;
        padding: 0;
    }

    .cwms-booking-modal__dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .cwms-booking-form {
        padding: 28px 18px;
    }

    .cwms-booking-form__grid,
    .cwms-booking-summary {
        grid-template-columns: 1fr;
    }
}
