:root {
    --bw-bg: #f7f4ef;
    --bw-card: #ffffff;
    --bw-ink: #2b2b2b;
    --bw-accent: #1f7a8c;
    --bw-muted: #8a7f72;
    --bw-line: #e7e1d8;
    --bw-shadow: 0 10px 30px rgba(20, 20, 20, 0.08);
    --bw-radius: 18px;
    --bw-panel-height: 380px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(
        circle at 20% 20%,
        #fef6ee,
        #f4efe7 40%,
        #ece7df 100%
    );
    color: var(--bw-ink);
}

.bw-root {
    max-width: 640px;
    width: 100%;
    margin: 32px auto;
    padding: 28px;
    background: var(--bw-card);
    border-radius: var(--bw-radius);
    box-shadow: var(--bw-shadow);
}

#booking-widget.is-confirm .bw-root {
    width: fit-content;
    max-width: 100%;
}

#booking-widget.is-confirm .bw-body {
    width: fit-content;
    max-width: 100%;
}

.bw-body {
    display: block;
}

.bw-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    position: relative;
}

.bw-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bw-back {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--bw-line);
    background: #fff;
    color: #6c7a7d;
    cursor: pointer;
    flex: 0 0 auto;
}

.bw-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cfe3e9;
    background: #e2edf0;
    color: #1b5b66;
    display: grid;
    place-items: center;
    font-weight: 600;
    flex: 0 0 auto;
}

.bw-title {
    font-size: 26px;
    letter-spacing: -0.02em;
}

.bw-subtitle {
    color: var(--bw-muted);
    font-size: 14px;
}

.bw-day {
    border-top: 1px solid var(--bw-line);
    padding: 16px 0 8px;
}

.bw-day:first-of-type {
    border-top: none;
}

.bw-day-title {
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.bw-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.bw-slot {
    border: 1px solid var(--bw-line);
    background: #fbfaf8;
    padding: 10px 12px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.bw-slot-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.bw-slot-time {
    font-weight: 600;
}

.bw-slot-count {
    color: var(--bw-muted);
    font-size: 12px;
}

.bw-slot-book {
    width: 100%;
    background: var(--bw-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.bw-slot-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2edf0;
    color: #2f6c78;
    font-size: 12px;
}

.bw-calendar {
    display: grid;
    gap: 22px;
}

.bw-layout {
    display: grid;
    grid-template-columns: 320px 380px;
    gap: 24px;
    align-items: stretch;
    justify-content: start;
    width: fit-content;
    max-width: 100%;
    margin: 0;
}

.bw-product-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.bw-product-chip {
    border: 1px solid var(--bw-line);
    background: #fbfaf8;
    color: var(--bw-ink);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}

.bw-product-chip.is-active {
    background: #e2edf0;
    border-color: #c4dbe1;
    color: #1b5b66;
    font-weight: 600;
}

.bw-layout.is-single {
    grid-template-columns: 1fr;
    justify-items: start;
    width: fit-content;
    max-width: 100%;
}

.bw-calendar-wrap {
    border-radius: 22px;
    padding: 18px;
    height: var(--bw-panel-height);
    max-width: 320px;
}

.bw-calendar-wrap.is-short-month {
    padding-bottom: 48px;
}

.bw-month {
    border-top: 1px solid var(--bw-line);
}

.bw-month:first-child {
    border-top: none;
}

.bw-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.bw-month-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    text-transform: capitalize;
}

.bw-month-nav {
    display: flex;
    gap: 8px;
}

.bw-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--bw-line);
    background: #fff;
    color: #6c7a7d;
    cursor: pointer;
}

.bw-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.bw-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 12px;
    color: var(--bw-muted);
    text-align: center;
    margin-bottom: 8px;
}

.bw-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.bw-day-cell {
    border: 1px solid var(--bw-line);
    background: #fbfaf8;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    padding: 0;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.bw-day-cell.is-available {
    background: #e2edf0;
    border-color: #c4dbe1;
    color: #1b5b66;
    font-weight: 600;
}

.bw-day-cell.is-available:hover,
.bw-day-cell.is-available:focus {
    background: #d6e6ea;
    border-color: #b8d1d8;
}

.bw-day-cell.is-available.is-selected:hover,
.bw-day-cell.is-available.is-selected:focus {
    background: var(--bw-accent);
    border-color: var(--bw-accent);
}

.bw-day-cell.is-selected {
    background: var(--bw-accent);
    color: #fff;
    border-color: var(--bw-accent);
}

.bw-day-cell.is-today {
    box-shadow: 0 0 0 2px rgba(31, 122, 140, 0.2);
}

.bw-day-cell:disabled {
    cursor: default;
    background: transparent;
    border-color: transparent;
    color: var(--bw-muted);
}

.bw-empty-cell {
    border: none;
    background: transparent;
}

.bw-slot-list {
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--bw-shadow);
    height: var(--bw-panel-height);
    overflow: auto;
    width: 100%;
    max-width: 240px;
    justify-self: start;
}

.bw-slot-list.is-form {
    width: 480px;
    max-width: 480px;
    height: auto;
    margin: 0;
}

.bw-day-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.bw-slots-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 10px;
    max-width: 320px;
}

.bw-slot-row {
    border: 1px solid var(--bw-line);
    background: #fbfaf8;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
}

.bw-slot-row.is-action {
    background: #e2edf0;
    border-color: #c4dbe1;
    color: #1b5b66;
    font-weight: 600;
}

.bw-slot-row:focus,
.bw-slot-row:hover {
    background: #e2edf0;
    color: #1b5b66;
    border: 1px solid #c4dbe1;
}

.bw-slot-row.is-selected {
    background: var(--bw-accent);
    color: #fff;
    border: 1px solid var(--bw-accent);
    font-weight: 600;
}

.bw-form {
    display: grid;
    gap: 12px;
}

.bw-form-error {
    min-height: 18px;
    color: #b3252d;
    font-size: 13px;
}

.bw-readonly-note {
    font-size: 12px;
    color: var(--bw-muted);
    margin-bottom: 10px;
    text-align: left;
}

.bw-field {
    display: grid;
    gap: 6px;
    text-align: left;
    font-size: 13px;
    color: var(--bw-muted);
}

.bw-field input,
.bw-field textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--bw-line);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--bw-ink);
    background: #fbfaf8;
}

.bw-field textarea {
    resize: vertical;
}

.bw-email-row {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 10px;
    align-items: stretch;
}

.bw-email-edit {
    border: 1px solid var(--bw-line);
    background: #fff;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--bw-ink);
}

.bw-email-edit svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.bw-email-edit:hover {
    background: #fbfaf8;
}

.bw-email-edit:disabled {
    opacity: 0.6;
    cursor: default;
}

.bw-field input[readonly] {
    background: #f3f1ed;
    border-color: #d7d2c8;
    color: var(--bw-muted);
    cursor: not-allowed;
}

.bw-field-note {
    font-size: 12px;
    color: var(--bw-muted);
}

.bw-submit {
    margin-top: 6px;
    background: var(--bw-accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
}

.bw-link-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.bw-link-input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--bw-line);
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bw-ink);
    background: #fbfaf8;
}

.bw-link-copy {
    border: 1px solid var(--bw-line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
}

.bw-calendar-hint,
.bw-support-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--bw-muted);
    text-align: left;
}

.bw-calendar-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.bw-calendar-btn {
    border: 1px solid var(--bw-line);
    background: #fbfaf8;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
}

.bw-support-btn {
    margin-top: 8px;
    border: 1px solid var(--bw-line);
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
}

.bw-empty {
    color: var(--bw-muted);
    padding: 24px 0;
}

.bw-error {
    color: #b3252d;
    background: #fff3f4;
    border: 1px solid #f2c4c8;
    padding: 12px 14px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .bw-root {
        margin: 12px auto;
        padding: 16px 12px;
        width: 100%;
        text-align: center;
    }

    #booking-widget.is-confirm .bw-root {
        width: 100%;
    }

    #booking-widget.is-confirm .bw-body {
        width: 100%;
        max-width: 100%;
    }

    .bw-header-row {
        justify-content: center;
    }

    .bw-title {
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .bw-slot {
        align-items: flex-start;
    }

    .bw-slot-book {
        width: 100%;
    }
    .bw-calendar-wrap {
        width: 100%;
        max-width: 360px;
        height: auto;
    }

    .bw-calendar-grid {
        gap: 4px;
    }

    .bw-layout {
        grid-template-columns: 1fr;
        width: 100%;
        justify-items: center;
        margin: 0 auto;
    }

    .bw-product-switch {
        justify-content: center;
    }

    .bw-slot-list {
        padding: 16px;
        max-width: 360px;
        width: 100%;
        margin: auto;
    }

    .bw-slot-list.is-form {
        width: min(100%, 480px);
        max-width: 480px;
        margin: 0 auto;
    }

    .bw-link-row {
        grid-template-columns: 1fr;
    }

    .bw-calendar-buttons {
        grid-template-columns: 1fr;
    }

    .bw-layout.is-single {
        width: 100%;
        justify-items: center;
    }
}

