/* =========================================
   Booking Bar — booking-bar.css
   Place in: /wp-content/themes/your-child-theme/booking-bar/
   ========================================= */

/* ---------- Reset / Base ---------- */
.bbar-wrapper *,
.bbar-wrapper *::before,
.bbar-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ and Edge */
    user-select: none;
}

/* ---------- Wrapper ---------- */
.bbar-wrapper {
    width: 100%;
    padding: 19px 30px;
    font-family: "Neue Hass Display", sans-serif;
    position: relative;
    z-index: 100;
}

/* ---------- Container ---------- */
.bbar-container {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 4px;
    padding: 0;
    overflow: visible;
    position: relative;
    gap: 10px;
}

/* ---------- Dividers ---------- */
.bbar-divider {
    width: 1px;
    height: 36px;
    background: #e0e0e0;
    flex-shrink: 0;
    display: none;
}

/* ---------- Fields ---------- */
.bbar-field {
    position: relative;
    flex: 1;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    min-width: 0;
    border: 1px solid #e0e0e0;
}

.bbar-field:hover {
    background: #f8f8f8;
}

.bbar-field--events {
    flex: 1.4;
}

.bbar-label {
    display: block;
    font-size: 11px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.bbar-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bbar-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbar-icon {
    display: flex;
    align-items: center;
    color: #666;
    flex-shrink: 0;
}

/* ---------- Shared Dropdown / Panel ---------- */
.bbar-dropdown,
.bbar-calendar-box {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 9999;
    min-width: 340px;
}

.bbar-dropdown.is-open,
.bbar-calendar-box.is-open {
    display: block;
}

/* ---------- Events Dropdown ---------- */
#bbar-events-dropdown {
    min-width: 340px;
}

.bbar-dropdown__list {
    list-style: none;
    padding: 8px 0;
}

.bbar-dropdown__item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.bbar-dropdown__item:hover,
.bbar-dropdown__item.is-selected {
    background: #f4f4f4;
}

.bbar-dropdown__title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.bbar-dropdown__desc {
    display: block;
    font-size: 12px;
    color: #999;
}

.bbar-dropdown__footer {
    border-top: 1px solid #f0f0f0;
    padding: 10px 20px;
    text-align: right;
}

.bbar-close-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-weight: 500;
}

.bbar-close-btn:hover {
    color: #555;
}

/* ---------- Calendar Box ---------- */
.bbar-calendar-box {
    min-width: 680px;
    left: 0;
}

/* Push calendar box leftward when triggered from checkout field */
.bbar-field--checkout .bbar-calendar-box {
    left: auto;
    right: 0;
}

.bbar-calendar-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 24px;
}

.bbar-calendar-box__min-title {
    display: block;
    font-size: 15px;
    color: #1a1a1a;
}

.bbar-calendar-box__min-sub {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.bbar-calendar-box__dates {
    display: flex;
    gap: 12px;
}

.bbar-cal-date-field {
    border: 1px solid #d0d0d0;
    border-radius: 0px;
    padding: 8px 14px;
    min-width: 130px;
}

.bbar-cal-date-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.bbar-cal-date-value {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
}

/* Calendar mount area — your calendar library renders here */
#bbar-calendar-mount {
    padding: 16px 24px;
    min-height: 60px;
    display: flex;
    justify-content: space-between;
}

#bbar-calendar-mount .qs-datepicker-container
{
    position: relative;
    top: initial;
    left: initial;
}

/* ---------- Guests Dropdown ---------- */
#bbar-guests-dropdown {
    min-width: 360px;
    right: 0;
    left: auto;
}

.bbar-guests-list {
    padding: 8px 0;
}

.bbar-guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f4f4f4;
}

.bbar-guest-row:last-child {
    border-bottom: none;
}

.bbar-guest-row--pets {
    opacity: 0.6;
}

.bbar-guest-type {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.bbar-guest-age {
    display: block;
    font-size: 12px;
    color: #999;
}

/* Quantity control */
.bbar-qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bbar-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.12s, border-color 0.12s;
    padding: 0;
}

.bbar-qty-btn:hover, .bbar-qty-btn:focus, .bbar-qty-btn:active {
    background: #fff;
    border-color: #000;
}

.bbar-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bbar-qty-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    min-width: 18px;
    text-align: center;
}

/* ---------- CTA Buttons ---------- */
.bbar-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.bbar-btn {
    padding: 0 24px;
    height: 100%;
    min-height: 62px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
    white-space: nowrap;
    border-radius: 0!important;
}

.bbar-btn:hover, .bbar-btn:focus, .bbar-btn:active {

}

.bbar-btn--check:hover, .bbar-btn--check:focus, .bbar-btn--check:active
{
    background-color: #2d4a3e;
}

.bbar-btn--call:hover, .bbar-btn--call:focus, .bbar-btn--call:active
{
    background-color: #e07b27;
}

.bbar-btn--check {
    background: #2d4a3e;
    color: #fff;
}

.bbar-btn--call {
    background: #e07b27;
    color: #fff;
    border-radius: 0 4px 4px 0;
}

/* -------------- Calendar mount ------------- */
#bbar-calendar-mount .ui-widget-header
{
    background-color: #fff!important;
    border: 0!important;
}
#bbar-calendar-mount .ui-widget.ui-widget-content
{
    border: 0!important;
}
#bbar-calendar-mount .ui-datepicker-calendar th, #bbar-calendar-mount .ui-datepicker-calendar td
{
    border: 0!important;
}
#bbar-calendar-mount .ui-state-active
{
    background-color: #FFEDDA!important;
    border: #F08E24!important;
    color: #000!important;
}
#bbar-calendar-mount .ui-state-default
{
    border: 0!important;
    background-color: #fff;
}
#bbar-calendar-mount .daterangepicker
{
    display: grid!important;
    position: relative!important;
    left: 50%!important;
    right: initial!important;
    top: initial!important;
    grid-template-columns: 1fr 1fr!important;
    bottom: initial!important;
    transform: translateX(-50%)!important;
    width: 100%!important;
}
.daterangepicker .ranges
{
    display: none;
}
.dates-cal
{
    display: none;
}
.daterangepicker td.active, .daterangepicker td.in-range, .daterangepicker td.active.end-date
{
    background-color: #FFEDDA!important;
}
.daterangepicker td.active
{
    color: #000 !important;
    border: 0 !important;
    border-style: solid;
    border-radius: 0 !important;
    box-shadow: inset 0 0 0 1px #F08E24 !important;
}
.daterangepicker::before
{
    display: none!important;
}
.daterangepicker .drp-calendar
{
    width: 100%!important;
    max-width: 100%!important;
}
.daterangepicker table tbody>tr:nth-child(odd)>td:not(.in-range), .daterangepicker table tbody>tr:nth-child(odd)>th:not(.in-range)
{
    
}
td.disabled:not(.disabled-start):not(.disabled-end) {
  background-color: #30503D !important;
}

/* First in group — right half colored, left half transparent */
td.disabled-start {
  background: linear-gradient(
    to bottom right,
    transparent 50%,
    #30503D 50%
  )!important;
}

/* Last in group — left half colored, right half transparent */
td.disabled-end {
  background: linear-gradient(
    to top left,
    transparent 50%,
    #30503D 50%
  )!important;
}

/* If a group is a single cell, show full color */
td.disabled-start.disabled-end {
  background: #30503D!important;
}

.daterangepicker td.disabled, .daterangepicker option.disabled
{
    color: #c6c6c6;
}

.daterangepicker td
{
    border: 0px solid transparent!important;
}

.daterangepicker td.today
{
    background-color: #c1c1c1 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.legend {
      display: flex;
      align-items: center;
      gap: 24px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      font-size: 14px;
      color: #333;
    }

    .legend-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }

    .legend-top {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .legend-box {
      width: 28px;
      height: 28px;
      border-radius: 4px;
    }

    .legend-box.past    { background: #ebe9e9; }
    .legend-box.today   { background: #c1c1c1; }
    .legend-box.booked  { background: #30503D; }

   

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .bbar-container {
        flex-wrap: wrap;
    }

    .bbar-field {
        flex: 1 1 40%;
    }

    .bbar-divider {
        display: none;
    }

    .bbar-actions {
        width: 100%;
    }

    .bbar-btn {
        flex: 1;
        min-height: 48px;
    }

    .bbar-calendar-box {
        min-width: 100%;
        position: fixed;
        top: 24px;
        z-index: 999999999;
         left: 0; 
         transform: none; 
        max-width: 100%;
    }

    #bbar-guests-dropdown,
    #bbar-events-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        min-width: 300px;
        max-width: 96vw;
    }
	.bbar-calendar-box__header
	{
		padding: 0 24px!important;
	}
	.bbar-dropdown__footer
	{
		padding: 0 20px!important;
	}
}
