/* ============================================
   MBH Booking Widget  v1.3
   ============================================ */

/* Widget wrapper — relative so overlays anchor to it */
.mbhbw {
    position: relative;
    max-width: 560px;
    font-family: inherit;
}

.mbhbw__hint {
    font-size: 14px;
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ---- Fields row ---- */

.mbhbw__fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mbhbw__field {
    flex: 1 1 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #c8d5e8;
    border-radius: 50px;
    padding: 12px 18px;
    min-height: 52px;
    cursor: pointer;
    transition: border-color 0.15s;
    background: #fff;
    user-select: none;
}

.mbhbw__field:hover,
.mbhbw__field--active {
    border-color: #58A8C4;
}

.mbhbw__field-icon {
    display: flex;
    align-items: center;
    color: #58A8C4;
    flex-shrink: 0;
}

.mbhbw__field-text {
    font-size: 15px;
    color: #aab4c4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.mbhbw__field--set .mbhbw__field-text {
    color: #1a2e4a;
    font-weight: 500;
}

/* ---- Overlay panels (float over content) ---- */

.mbhbw__overlay {
    display: none;
    /* position & z-index set by JS portal (position:fixed on document.body) */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.mbhbw__overlay--open {
    display: block;
}

/* Guest panel */
.mbhbw__overlay--guests {
    width: 320px;
    padding: 22px 24px;
}

.mbhbw__guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mbhbw__guest-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2e4a;
    display: block;
    margin-bottom: 4px;
}

.mbhbw__guest-max {
    font-size: 13px;
    color: #7a8ea8;
}

.mbhbw__guest-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mbhbw__guest-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1a2e4a;
    display: flex;
    align-items: center;
    transition: opacity 0.15s;
}

.mbhbw__guest-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.mbhbw__guest-count {
    font-size: 18px;
    font-weight: 600;
    color: #1a2e4a;
    min-width: 22px;
    text-align: center;
}

/* Calendar panel */
.mbhbw__overlay--cal {
    padding: 22px 24px 18px;
    /* Wide enough for two months side by side */
    width: max-content;
    min-width: 560px;
    max-width: calc(100vw - 32px);
}

.mbhbw__cal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #7a8ea8;
    font-size: 14px;
}

/* Nav row: prev arrow | months | next arrow */
.mbhbw__cal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mbhbw__nav-btn {
    background: none;
    border: 1.5px solid #c8d5e8;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #1a2e4a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color 0.15s;
}

.mbhbw__nav-btn:hover {
    border-color: #58A8C4;
    color: #58A8C4;
}

/* Two months side by side — never wrap */
.mbhbw__months {
    display: flex;
    flex-direction: row;
    gap: 32px;
    flex: 1;
    flex-wrap: nowrap;
}

.mbhbw__month {
    flex: 0 0 auto;
    width: 210px;
}

.mbhbw__month-title {
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #1a2e4a;
    margin-bottom: 12px;
}

/* 7-col grid */
.mbhbw__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
}

.mbhbw__dn {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #7a8ea8;
    padding-bottom: 8px;
}

.mbhbw__cell {
    background: none;
    border: none;
    text-align: center;
    font-size: 14px;
    color: #1a2e4a;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background 0.1s, color 0.1s;
}

.mbhbw__cell--empty {
    visibility: hidden;
    pointer-events: none;
}

.mbhbw__cell--off {
    color: #cdd6e0;
    text-decoration: line-through;
    cursor: default;
    pointer-events: none;
}

.mbhbw__cell:not(.mbhbw__cell--off):not(.mbhbw__cell--sel):hover {
    background: #e8f4f9;
}

/* Range highlight (between selected/hover dates) */
.mbhbw__cell--range {
    background: #d4edf6;
    border-radius: 0;
    width: 100%;
}

/* First day of range */
.mbhbw__cell--sel-start.mbhbw__cell--range {
    border-radius: 50% 0 0 50%;
    width: 100%;
}

/* Last day of range */
.mbhbw__cell--sel-end.mbhbw__cell--range {
    border-radius: 0 50% 50% 0;
    width: 100%;
}

/* Selected (check-in / check-out dot) */
.mbhbw__cell--sel {
    background: #58A8C4 !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 50%;
    width: 30px;
    z-index: 1;
    position: relative;
}

/* Calendar footer */
.mbhbw__cal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef1f6;
    gap: 12px;
}

.mbhbw__cal-footer span {
    font-size: 13px;
    color: #7a8ea8;
}

.mbhbw__clear-btn {
    background: none;
    border: 1.5px solid #c8d5e8;
    border-radius: 50px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1a2e4a;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s;
}

.mbhbw__clear-btn:hover {
    border-color: #58A8C4;
    color: #58A8C4;
}

/* ---- Price ---- */

.mbhbw__price {
    padding: 12px 16px;
    background: #f2fafd;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

.mbhbw__price-val {
    font-weight: 700;
    color: #1a2e4a;
}

.mbhbw__price-loading {
    color: #7a8ea8;
    font-size: 13px;
}

.mbhbw__price-none {
    color: #c0392b;
    font-size: 13px;
}

/* ---- Book Now ---- */

.mbhbw__book-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #58A8C4;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    padding: 15px 24px;
    text-decoration: none;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
}

.mbhbw__book-btn:hover {
    background: #4a95b0;
    color: #fff;
    text-decoration: none;
}

/* ---- Responsive ---- */

@media (max-width: 540px) {
    .mbhbw__overlay--cal {
        min-width: calc(100vw - 32px);
        left: -16px;
    }
    .mbhbw__months {
        flex-direction: column;
        gap: 24px;
    }
    .mbhbw__month {
        width: 100%;
    }
    .mbhbw__fields {
        flex-direction: column;
    }
    .mbhbw__field {
        flex: none;
    }
}
