
.fwb-booking {
    max-width: 760px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 8px;
}

.fwb-booking label {
    font-weight: 600;
}

.fwb-booking input,
.fwb-booking select,
.fwb-booking textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #fff;
}

.fwb-booking input[type="text"],
.fwb-booking input[type="email"],
.fwb-booking input[type="number"],
.fwb-booking select,
.fwb-booking textarea {
    min-height: 34px;
    padding: .35rem .5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: none;
    color: inherit;
    font: inherit;
}

.fwb-booking input[type="text"]:focus,
.fwb-booking input[type="email"]:focus,
.fwb-booking input[type="number"]:focus,
.fwb-booking select:focus,
.fwb-booking textarea:focus {
    border-color: #7aa7ee;
    box-shadow: 0 0 0 2px rgba(122,167,238,.35);
    outline: none;
}

.fwb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: .95rem;
}

.fwb-dot {
    display: inline-block;
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    margin-right: .25rem;
    vertical-align: middle;
}

.fwb-dot-free { background: #46b450; }
.fwb-dot-blocked { background: #dc3232; }
.fwb-dot-turnover { background: linear-gradient(90deg, #dc3232 0 50%, #46b450 50% 100%); }
.fwb-dot-selected { background: #2271b1; }

.fwb-range-summary {
    padding: .75rem 1rem;
    background: rgba(255,255,255,.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.fwb-range-text {
    margin-top: .25rem;
}

.fwb-occupancy-hint {
    margin: -.35rem 0 1rem;
    padding: .65rem .8rem;
    border-left: 4px solid #d3b36a;
    background: #fff8df;
    color: #4f3700;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
}

.fwb-occupancy-hint[hidden] {
    display: none;
}

.fwb-turnstile-fallback {
    margin: .75rem 0;
    padding: .75rem .9rem;
    border-left: 4px solid #d3b36a;
    background: #fff8df;
    color: #4f3700;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
}

.fwb-turnstile-fallback[hidden] {
    display: none;
}

.fwb-calendar {
    background: rgba(255,255,255,.95);
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    max-width: 760px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.fwb-calendar-nav {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
}

.fwb-calendar-nav button {
    width: 44px;
    height: 44px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.fwb-calendar-nav button:hover {
    background: #f3f3f3;
}

.fwb-cal-title {
    text-transform: capitalize;
    font-size: 1.2rem;
    text-align: center;
}

.fwb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .35rem;
}

.fwb-calendar-weekdays {
    font-weight: 700;
    text-align: center;
    margin-bottom: .35rem;
    color: #555;
}

.fwb-calendar-weekdays span {
    padding: .35rem 0;
}

.fwb-cal-empty {
    min-height: 2.5rem;
}

.fwb-cal-loading {
    grid-column: 1 / -1;
    padding: 1rem;
    text-align: center;
}

.fwb-cal-day {
    position: relative;
    min-height: 2.8rem;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    padding: 0;
}

.fwb-cal-day:hover:not(:disabled) {
    background: #eef6ff;
    border-color: #2271b1;
}

.fwb-cal-day.is-past {
    opacity: .35;
    cursor: not-allowed;
}

.fwb-cal-day.is-blocked {
    background: #ffe9e9;
    border-color: #f1b2b2;
    color: #a40000;
    cursor: not-allowed;
}

.fwb-cal-day.is-free {
    background: #edf9ef;
    border-color: #b8e2bf;
    color: #145a21;
}

.fwb-cal-day.is-no-price {
    background: #f0f0f0;
    border-color: #cfcfcf;
    color: #666;
}

.fwb-cal-day.is-booked-start {
    background: linear-gradient(90deg, #edf9ef 0 50%, #ffe2e2 50% 100%);
    border-color: #efb0b0;
    color: #5b3b00;
}

.fwb-cal-day.is-booked-end {
    background: linear-gradient(90deg, #ffe2e2 0 50%, #edf9ef 50% 100%);
    border-color: #efb0b0;
    color: #5b3b00;
}

.fwb-cal-day.is-booked-start.is-booked-end,
.fwb-cal-day.is-turnover {
    background: linear-gradient(90deg, #ffe2e2 0 50%, #ffe2e2 50% 100%);
    border-color: #efb0b0;
    color: #8a0000;
}

.fwb-cal-day.is-booked-start:hover:not(:disabled) {
    background: linear-gradient(90deg, #e2f4ff 0 50%, #ffe2e2 50% 100%);
}

.fwb-cal-day.is-booked-end:hover:not(:disabled) {
    background: linear-gradient(90deg, #ffe2e2 0 50%, #e2f4ff 50% 100%);
}

.fwb-cal-day.is-selected-range {
    background: #d9ecff;
    border-color: #8ec5ff;
    color: #0b3d66;
}

.fwb-cal-day.is-too-short:not(.is-arrival):not(.is-departure) {
    border-color: #d3b36a;
    color: #6d4d00;
}

.fwb-cal-day.has-stay-hint:hover:not(:disabled)::after,
.fwb-cal-day.is-too-short:hover:not(:disabled)::after,
.fwb-cal-day.is-no-price:hover:not(:disabled)::after {
    content: attr(data-stay-hint);
    position: absolute;
    left: 50%;
    bottom: calc(100% + .35rem);
    transform: translateX(-50%);
    z-index: 2;
    min-width: 11rem;
    padding: .35rem .5rem;
    background: #fff8df;
    border: 1px solid #d3b36a;
    color: #4f3700;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    pointer-events: none;
}

.fwb-cal-day.is-no-price:hover:not(:disabled)::after {
    content: attr(data-price-hint);
    background: #f4f4f4;
    border-color: #c8c8c8;
    color: #444;
    min-width: 16rem;
}

.fwb-cal-day.has-stay-hint:hover:not(:disabled)::after {
    background: #eef9ef;
    border-color: #9ad0a5;
    color: #145a21;
}

.fwb-cal-day.is-arrival,
.fwb-cal-day.is-departure {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.fwb-price-box {
    margin: 1rem 0;
    padding: .9rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: rgba(255,255,255,.95);
}

.fwb-child-ages {
    display: grid;
    gap: .65rem;
    margin: -.25rem 0 1rem;
}

.fwb-child-age-row label {
    display: block;
    margin-bottom: .2rem;
}

.fwb-price-content {
    margin-top: .5rem;
}

.fwb-price-meta {
    margin-bottom: .5rem;
    font-size: .95rem;
}

.fwb-price-table {
    width: 100%;
    border-collapse: collapse;
}

.fwb-price-table td {
    padding: .35rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.fwb-price-table td:last-child {
    text-align: right;
}

.fwb-price-table .fwb-total td {
    font-weight: 700;
    border-bottom: 0;
    padding-top: .6rem;
}

.fwb-price-error {
    color: #b00020;
    font-weight: 600;
}

.fwb-price-note {
    color: #555;
}

.fwb-turnstile {
    margin: 1rem 0;
}

.fwb-submit {
    appearance: none;
    background-color: #cfe8d3;
    border: 0 solid;
    border-radius: 0;
    color: #1a4548;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-size: var(--wp--preset--font-size--medium, 1.125rem);
    font-weight: 600;
    line-height: 1.2;
    padding: calc(.667em + 2px) calc(1.333em + 2px);
    text-decoration: none;
    text-transform: uppercase;
}

.fwb-submit:hover:not(:disabled),
.fwb-submit:focus:not(:disabled) {
    background-color: #bddfc4;
    opacity: .9;
}

.fwb-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.fwb-feedback {
    margin: 0 0 1rem 0;
}

.fwb-feedback-success {
    padding: .9rem;
    border-left: 4px solid #46b450;
    background: #f0fff4;
    color: #145a21;
    font-weight: 600;
}

.fwb-booking .fwb-feedback.fwb-feedback-success {
    border-left-color: #46b450 !important;
    background: #f0fff4 !important;
    color: #145a21 !important;
}

.fwb-feedback-error {
    padding: .9rem;
    border-left: 4px solid #dc3232;
    background: #fff5f5;
    font-weight: 600;
}

.fwb-feedback-info {
    padding: .9rem;
    border-left: 4px solid #2271b1;
    background: #f0f7ff;
    color: #0b3d66;
    font-weight: 600;
}

.fwb-required-hint {
    margin: 1rem 0;
    padding: .75rem .9rem;
    border-left: 4px solid #d3b36a;
    background: #fff8df;
    color: #4f3700;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
}

.fwb-required-hint[hidden] {
    display: none;
}

.fwb-required-hint ul {
    margin: .35rem 0 0 1.1rem;
}

.fwb-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.fwb-field-grid p {
    margin-top: 0;
}

.fwb-companions {
    margin: 1rem 0;
}

.fwb-companions strong {
    display: block;
    margin-bottom: .4rem;
}

.fwb-booking.is-booking-complete .fwb-submit {
    display: none !important;
}

@media (max-width: 600px) {
    .fwb-field-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fwb-calendar {
        padding: .75rem;
    }

    .fwb-calendar-grid {
        gap: .25rem;
    }

    .fwb-cal-day {
        min-height: 2.45rem;
        font-size: .9rem;
    }

    .fwb-cal-title {
        font-size: 1rem;
    }
}
