/* ====== Booking Widget — booking-widget.css ====== */

/* Top layout: title left, booking right */
.listing-top {
    display: grid; grid-template-columns: 1fr 400px; gap: 2rem; align-items: start;
}
.listing-top-left { min-width: 0; }
.bw {
    background: white; border: 1px solid #ddd; border-radius: 12px;
    padding: 1.5rem 1.5rem 1.2rem;
    box-shadow: 0 6px 28px rgba(0,0,0,0.12);
    font-family: 'Open Sans', sans-serif;
    position: sticky; top: 90px;
    overflow: visible;
}
.bw-subtitle { font-size: 0.85em; color: #888; margin-bottom: 1.2rem; }

/* Date row */
.bw-dates {
    display: grid; grid-template-columns: 1fr 1fr;
    border: 2px solid #b0b0b0; border-radius: 10px; overflow: hidden;
    margin-bottom: 0; cursor: pointer; transition: border-color 0.15s;
}
.bw-dates.active { border-color: #222; }
.bw-date-field { padding: 10px 14px; position: relative; }
.bw-date-field:first-child { border-right: 1px solid #b0b0b0; }
.bw-date-field.active { background: #f7f7f7; }
.bw-date-label {
    font-size: 0.65em; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.08em; color: #222; margin-bottom: 2px;
}
.bw-date-value { font-size: 0.9em; color: #717171; min-height: 1.2em; }
.bw-date-value.has-value { color: #222; font-weight: 500; }

/* Guest selector */
.bw-guests-row {
    border: 2px solid #b0b0b0; border-top: none; border-radius: 0 0 10px 10px;
    padding: 10px 14px; cursor: pointer; position: relative;
    transition: border-color 0.15s;
}
.bw-guests-row.active { border-color: #222; }
.bw-guests-label {
    font-size: 0.65em; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.08em; color: #222; margin-bottom: 2px;
}
.bw-guests-value { font-size: 0.9em; color: #222; display: flex; justify-content: space-between; align-items: center; }
.bw-guests-value .chevron { font-size: 0.7em; color: #222; transition: transform 0.2s; }
.bw-guests-value .chevron.open { transform: rotate(180deg); }

/* Guest dropdown */
.bw-guests-dropdown {
    display: none; border: 1px solid #ddd; border-radius: 10px;
    padding: 1rem 1.2rem; margin-top: 0.8rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1); background: white;
}
.bw-guests-dropdown.open { display: block; }
.bw-guest-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 0; border-bottom: 1px solid #f0f0f0;
}
.bw-guest-row:last-child { border-bottom: none; }
.bw-guest-info h5 { margin: 0; font-size: 0.95em; font-weight: 600; color: #222; font-family: 'Open Sans', sans-serif; }
.bw-guest-info span { font-size: 0.8em; color: #888; }
.bw-guest-controls { display: flex; align-items: center; gap: 14px; }
.bw-guest-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid #b0b0b0;
    background: white; cursor: pointer; font-size: 1.1em; color: #444;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s, color 0.15s;
}
.bw-guest-btn:hover:not(.disabled) { border-color: #222; color: #222; }
.bw-guest-btn.disabled { border-color: #e0e0e0; color: #e0e0e0; cursor: default; }
.bw-guest-count { font-size: 1em; font-weight: 600; min-width: 20px; text-align: center; color: #222; }

/* Calendar popup — floats outside the booking widget */
.bw-calendar-popup {
    display: none; position: absolute; z-index: 100;
    left: 50%; transform: translateX(-50%);
    width: 700px; max-width: 95vw;
    background: white; border: 1px solid #ddd; border-radius: 14px;
    padding: 1.5rem 1.5rem 1rem;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    margin-top: 0.5rem;
}
.bw-calendar-popup.open { display: block; }
.bw-cal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.2rem;
}
.bw-cal-header-left h3 {
    font-family: 'Montserrat', sans-serif; font-size: 1.3em; font-weight: 700;
    color: #222; margin: 0 0 0.2rem;
}
.bw-cal-header-left span { font-size: 0.85em; color: #888; }
.bw-cal-header-dates {
    display: grid; grid-template-columns: 1fr 1fr;
    border: 2px solid #b0b0b0; border-radius: 10px; overflow: hidden;
    min-width: 260px;
}
.bw-cal-hd-field { padding: 8px 12px; cursor: pointer; position: relative; }
.bw-cal-hd-field:first-child { border-right: 1px solid #b0b0b0; }
.bw-cal-hd-field.active { border-color: #222; background: #f7f7f7; outline: 2px solid #222; border-radius: 8px; z-index: 1; }
.bw-cal-hd-label { font-size: 0.6em; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #222; }
.bw-cal-hd-value { font-size: 0.88em; color: #717171; }
.bw-cal-hd-value.has-value { color: #222; font-weight: 500; }
.bw-cal-hd-clear {
    position: absolute; top: 8px; right: 8px; background: none; border: none;
    cursor: pointer; font-size: 0.9em; color: #888; padding: 2px;
}
.bw-cal-hd-clear:hover { color: #222; }
.bw-cal-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}
.bw-cal-nav-btn {
    background: none; border: none; cursor: pointer; font-size: 1.3em;
    color: #222; padding: 6px 10px; border-radius: 50%;
    transition: background 0.15s;
}
.bw-cal-nav-btn:hover { background: #f0f0f0; }
.bw-cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.bw-cal-month-title {
    text-align: center; font-family: 'Montserrat', sans-serif;
    font-weight: 600; font-size: 0.95em; color: #222; margin-bottom: 0.8rem;
}
.bw-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.bw-cal-dow {
    font-size: 0.72em; font-weight: 600; color: #999; padding: 6px 0;
    font-family: 'Montserrat', sans-serif;
}
.bw-cal-day {
    padding: 0; height: 42px; display: flex; align-items: center; justify-content: center;
    font-size: 0.88em; cursor: pointer; position: relative; color: #222;
    transition: background 0.1s;
}
.bw-cal-day:hover:not(.unavail):not(.empty) { background: #f0f0f0; border-radius: 50%; }
.bw-cal-day.empty { cursor: default; }
.bw-cal-day.unavail { color: #ccc; text-decoration: line-through; cursor: not-allowed; }
.bw-cal-day.past { color: #ccc; cursor: not-allowed; }
.bw-cal-day.today .day-num { font-weight: 700; }
.bw-cal-day.selected { background: #222; color: white; border-radius: 50%; }
.bw-cal-day.in-range { background: #f0f0f0; }
.bw-cal-day.range-start { background: #222; color: white; border-radius: 50% 0 0 50%; }
.bw-cal-day.range-end { background: #222; color: white; border-radius: 0 50% 50% 0; }
.bw-cal-day.range-start.range-end { border-radius: 50%; }
.bw-cal-footer {
    display: flex; justify-content: flex-end; gap: 1rem;
    margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid #f0f0f0;
}
.bw-cal-footer-btn {
    background: none; border: none; cursor: pointer;
    font-family: 'Open Sans', sans-serif; font-size: 0.9em;
    font-weight: 600; padding: 8px 16px; border-radius: 8px;
}
.bw-cal-clear { color: #222; text-decoration: underline; }
.bw-cal-close { background: #222; color: white; }
.bw-cal-close:hover { background: #333; }

/* Summary & request */
.bw-summary { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #eee; }
.bw-line { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.9em; color: #444; }
.bw-line.total {
    font-weight: 700; border-top: 1px solid #ddd; padding-top: 0.8rem;
    margin-top: 0.5rem; font-size: 1em; color: #222;
}
.bw-request-btn {
    display: block; width: 100%; padding: 14px; margin-top: 1rem;
    background: #222; color: white; border: none; border-radius: 8px;
    font-size: 1em; font-weight: 600; cursor: pointer; text-align: center;
    text-decoration: none; font-family: 'Montserrat', sans-serif;
    transition: background 0.15s;
}
.bw-request-btn:hover { background: #444; color: white; }

/* Responsive */
@media (max-width: 900px) {
    .listing-top { grid-template-columns: 1fr; }
    .bw { position: static; margin-top: 2rem; }
}
@media (max-width: 768px) {
    .bw { margin: 1.5rem 0; }
    .bw-cal-months { grid-template-columns: 1fr; gap: 1.5rem; }
}
