/*
 * Booking Calendar — styles
 * Clean, minimal design that inherits site typography
 * Brand colors: Plywood Lodge
 */

/* ─── Custom properties ─────────────────────────────────────────────────── */
:root {
  --bc-accent:          #b78953; /* Primary: warm golden brown */
  --bc-accent-light:    rgba(183, 137, 83, 0.15);
  --bc-accent-dark:     #964734; /* Secondary: rustic red-brown */
  --bc-text:            #222222;
  --bc-text-muted:      #717171;
  --bc-border:          #DDDDDD;
  --bc-bg:              #FFFFFF;
  --bc-bg-hover:        #F7F7F7;
  --bc-disabled-text:   #B0B0B0;
  --bc-disabled-strike: #D8D8D8;
  --bc-radius-sm:       8px;
  --bc-radius-md:       12px;
  --bc-radius-lg:       24px;
  --bc-shadow-sm:       0 2px 8px rgba(0,0,0,0.08);
  --bc-shadow-md:       0 4px 24px rgba(0,0,0,0.12);
  --bc-day-size:        40px;
}

/* ─── Generic buttons ───────────────────────────────────────────────────── */
.bc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.55em 1.1em;
  border-radius: var(--bc-radius-lg);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  text-decoration: none;
  line-height: 1.3;
}

.bc-btn--ghost {
  background: var(--bc-bg);
  border-color: var(--bc-border);
  color: var(--bc-text-muted);
}
.bc-btn--ghost:hover {
  border-color: #999;
  background: var(--bc-bg-hover);
  color: var(--bc-text);
}

.bc-btn--secondary {
  background: var(--bc-bg-hover);
  border-color: var(--bc-border);
  color: var(--bc-text);
}
.bc-btn--secondary:hover {
  background: #ebebeb;
}

.bc-btn--danger-ghost {
  background: transparent;
  border-color: transparent;
  color: #C53030;
  padding: 0.3em 0.6em;
}
.bc-btn--danger-ghost:hover {
  background: #FFF5F5;
  border-color: #FED7D7;
}

.bc-actions {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* ─── Page wrapper ──────────────────────────────────────────────────────── */
.booking-calendar-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: var(--bc-text);
}

.booking-calendar-page__header {
  margin-bottom: 1.5rem;
}

.booking-calendar-page__title {
  margin: 0 0 0.25rem;
  color: var(--bc-text);
}

.booking-calendar-page__subtitle {
  margin: 0;
  color: var(--bc-text-muted);
}

.booking-calendar-page__body {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.booking-calendar-page__calendar {
  flex: 1 1 560px;
  min-width: 0;
}

.booking-calendar-page__summary,
.booking-calendar-page__extras {
  flex: 1 1 100%;
  width: 100%;
}

.booking-calendar-page__actions {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ─── Calendar shell ────────────────────────────────────────────────────── */
.bc-calendar {
  background: var(--bc-bg);
  border-radius: var(--bc-radius-md);
  border: 1px solid var(--bc-border);
  box-shadow: var(--bc-shadow-sm);
  padding: 1rem;
  user-select: none;
}

/* Navigation */
.bc-calendar__nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.bc-calendar__nav-btn {
  background: none;
  border: 1.5px solid var(--bc-border);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  color: var(--bc-text);
  transition: background 0.15s, border-color 0.15s;
}

.bc-calendar__nav-btn:hover:not(:disabled) {
  background: var(--bc-bg-hover);
  border-color: #999;
}

.bc-calendar__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Grid: flex row of month blocks */
.bc-calendar__grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ─── Single month ──────────────────────────────────────────────────────── */
.bc-month {
  flex: 1 1 220px;
  min-width: 0;
}

.bc-month__title {
  text-align: center;
  color: var(--bc-text);
  margin-bottom: 0.75rem;
}

.bc-month__header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.bc-month__dow {
  text-align: center;
  color: var(--bc-text-muted);
  padding: 4px 0;
  text-transform: uppercase;
}

.bc-month__cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

/* ─── Day cells ─────────────────────────────────────────────────────────── */
.bc-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bc-text);
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 50%;
  transition: background 0.12s, color 0.12s;
  padding: 0;
  margin: 0;
  outline: none;
}

.bc-day:focus-visible {
  box-shadow: 0 0 0 2px var(--bc-accent);
  z-index: 1;
}

.bc-day--empty {
  cursor: default;
  pointer-events: none;
}

.bc-day--lead {
  border-radius: 0;
}

.bc-day--trail {
  border-radius: 0;
}

.bc-day--lead.bc-day--in-range {
  background: var(--bc-accent-light);
}

.bc-day--trail.bc-day--in-range {
  background: var(--bc-accent-light);
}

.bc-day--past {
  color: var(--bc-disabled-text);
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
  text-decoration-color: var(--bc-disabled-strike);
}

.bc-day--blocked {
  color: var(--bc-disabled-text);
  cursor: not-allowed;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
  border-radius: 50%;
  opacity: 0.7;
  text-decoration: line-through;
  text-decoration-color: var(--bc-disabled-strike);
}

.bc-day--disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.bc-day--too-short {
  color: var(--bc-disabled-text);
  opacity: 0.6;
  text-decoration: line-through;
  text-decoration-color: var(--bc-disabled-strike);
}

/* Days blocked solely because min-nights can't be met from that check-in */
.bc-day--min-nights {
  color: var(--bc-disabled-text);
  opacity: 0.65;
  text-decoration: line-through;
  text-decoration-color: var(--bc-disabled-strike);
}

/* Nights within the mandatory min-stay window after check-in is selected.
   Rendered as in-range (not as a strikethrough error) but not clickable. */
.bc-day--min-stay {
  pointer-events: none;
  cursor: default;
}

/* Available days: slightly heavier weight to stand out from disabled ones */
.bc-day:not(.bc-day--disabled):not(.bc-day--empty) {
  font-weight: 600;
}

/* Hover: accent tint + subtle inner ring */
.bc-day:not(.bc-day--disabled):not(.bc-day--empty):not(.bc-day--start):not(.bc-day--end):not(.bc-day--in-range):not(.bc-day--hover-range):hover {
  background: var(--bc-accent-light);
  box-shadow: inset 0 0 0 1.5px rgba(183, 137, 83, 0.45);
}

.bc-day--today:not(.bc-day--start):not(.bc-day--end)::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bc-accent);
}

/* ─── Range highlight - solid bar ──────────────────────────────────────── */

.bc-day--in-range {
  background: var(--bc-accent-light);
  border-radius: 0;
  color: var(--bc-text);
}

.bc-day--start,
.bc-day--end {
  background: var(--bc-accent) !important;
  color: #fff !important;
  border-radius: 0;
  z-index: 1;
}

.bc-day--start {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.bc-day--end {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.bc-day--start.bc-day--start-only {
  border-radius: 8px;
}

/* Hover preview range */
.bc-day--hover-range {
  background: var(--bc-accent-light);
  border-radius: 0;
  color: var(--bc-text);
}

.bc-day--hover-end {
  background: var(--bc-bg-hover);
  border-radius: 50%;
  color: var(--bc-text);
}

/* ─── Price summary ─────────────────────────────────────────────────────── */
.bc-price-summary__inner {
  background: var(--bc-bg);
  border: 1.5px solid var(--bc-border);
  border-radius: var(--bc-radius-md);
  padding: 1.25rem;
  box-shadow: var(--bc-shadow-sm);
  animation: bc-fade-in 0.2s ease;
}

.bc-price-summary--error {
  border-color: #d32f2f;
  background-color: #fff8f8;
}

.bc-price-summary__error {
  color: #d32f2f;
  margin: 0;
  font-weight: 500;
}

/* ─── Extras (add-ons) ──────────────────────────────────────────────────── */
.bc-extras__inner {
  background: var(--bc-bg);
  border: 1.5px solid var(--bc-border);
  border-radius: var(--bc-radius-md);
  padding: 1.25rem;
  box-shadow: var(--bc-shadow-sm);
}

.bc-extras__fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.bc-extras__legend {
  font-weight: 600;
  margin-bottom: 0.25rem;
  padding: 0;
  display: block;
  float: none;
  width: auto;
  font-size: 1.1em;
  color: var(--bc-text);
}

.bc-extras__description {
  color: var(--bc-text-muted);
  font-size: 0.9em;
  margin-bottom: 1rem;
}

.bc-extras__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bc-extra {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--bc-border);
  border-radius: var(--bc-radius-sm);
  cursor: pointer;
  background: var(--bc-bg);
  transition: border-color 0.15s, background 0.15s;
}

.bc-extra:hover {
  border-color: #999;
  background: var(--bc-bg-hover);
}

.bc-extra--selected {
  border-color: var(--bc-accent);
  background: var(--bc-accent-light);
}

.bc-extra__check-col {
  flex-shrink: 0;
}

.bc-extra__check-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bc-accent);
  cursor: pointer;
}

.bc-extra__body {
  flex: 1;
  min-width: 0;
}

.bc-extra__name {
  display: block;
  font-weight: 500;
  color: var(--bc-text);
}

.bc-extra__type {
  display: block;
  font-style: normal;
  font-size: 0.82em;
  color: var(--bc-text-muted);
}

.bc-extra__price {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--bc-text);
}

.bc-extra em {
  font-style: normal;
  color: var(--bc-text-muted);
}


@keyframes bc-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bc-price-summary__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.bc-price-summary__header-main {
  min-width: 0;
}

.bc-price-summary__label {
  display: block;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--bc-text);
}

.bc-price-summary__nights {
  display: block;
  font-size: 0.9em;
  color: var(--bc-text-muted);
  margin-top: 0.2rem;
}

.bc-price-summary__header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.bc-price-summary__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bc-text-muted);
  transition: color 0.15s;
  flex-shrink: 0;
  vertical-align: middle;
}

.bc-price-summary__toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.bc-price-summary__toggle:hover {
  color: var(--bc-text);
}

.bc-price-summary__toggle--open svg {
  transform: rotate(180deg);
}

.bc-extras__legend {
  margin: 0 0 0.75rem;
  color: var(--bc-text);
}

.bc-price-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--bc-border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.bc-price-row__nights-left {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.bc-price-summary__period-rows {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--bc-border);
  margin-left: 0.125rem;
  margin-bottom: 0.1rem;
}

.bc-price-row--period {
  color: var(--bc-text-muted);
  font-size: 0.9em;
}

.bc-price-row {
  display: flex;
  justify-content: space-between;
  color: var(--bc-text);
  gap: 1rem;
}

.bc-price-row em {
  font-style: normal;
  color: var(--bc-text-muted);
}

.bc-price-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bc-accent-light);
  border-radius: var(--bc-radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.bc-price-summary__total > span:first-child {
  font-weight: 600;
}

.bc-price-summary__total-value {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--bc-accent);
  letter-spacing: -0.01em;
}

.bc-price-summary__disclaimer {
  color: var(--bc-text-muted);
  margin: 0.75rem 0 0;
  font-size: 0.85em;
}

/* ─── Minimum nights hint ───────────────────────────────────────────────── */
.bc-min-nights-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.82em;
  font-weight: 500;
  color: var(--bc-text-muted);
  background: var(--bc-bg-hover);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  padding: 0.25em 0.75em;
  margin: 0 0 0.6rem;
  line-height: 1.6;
}

/* Moon icon via inline SVG background */
.bc-min-nights-hint::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ─── Webform element ───────────────────────────────────────────────────── */
.bc-date-range-element {
  position: relative;
}

.booking-calendar-element,
.webform-booking-date-range {
  position: relative;
}

.bc-date-fields {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1.5px solid var(--bc-border);
  border-radius: var(--bc-radius-sm);
  overflow: hidden;
  box-shadow: var(--bc-shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.bc-date-fields:hover {
  border-color: var(--bc-text);
}

.bc-date-fields:focus-within {
  border-color: var(--bc-accent);
  box-shadow: 0 0 0 2px var(--bc-accent-light);
}

.bc-date-field-wrap {
  flex: 1 1 0;
  position: relative;
}

.bc-date-field-wrap:first-child {
  border-right: 1px solid var(--bc-border);
}

.bc-date-field-wrap .form-item {
  margin: 0;
}

.bc-date-field-wrap label {
  position: absolute;
  top: 8px;
  left: 12px;
  text-transform: uppercase;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--bc-text-muted);
  pointer-events: none;
  z-index: 1;
}

/* Log-in arrow icon inside the left-hand (check-in) field */
.bc-date-field-wrap:first-of-type::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  opacity: 0.4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Calendar icon inside the right-hand (checkout) field */
.bc-date-field-wrap:last-of-type::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
}

.bc-display-checkin,
.bc-display-checkout {
  cursor: pointer !important;
  background: var(--bc-bg) !important;
  caret-color: transparent;
  border-radius: 0 !important;
  border: none !important;
  padding: 1.75em 0.75em 0.5em 0.75em !important;
  transition: none !important;
  box-shadow: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Extra right padding on checkout field to avoid overlap with calendar icon */
.bc-display-checkout {
  padding-right: 2.5em !important;
}

.bc-display-checkin:focus,
.bc-display-checkout:focus,
.bc-display-checkin:hover,
.bc-display-checkout:hover {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: var(--bc-bg-hover) !important;
}

.bc-display-checkin::placeholder,
.bc-display-checkout::placeholder {
  color: var(--bc-text-muted);
  opacity: 0.6;
}

/* ─── Calendar popup ────────────────────────────────────────────────────── */
.bc-calendar-popup {
  display: none;
  position: absolute; /* overridden to fixed by JS on desktop */
  z-index: 9500;
  min-width: 320px;
  width: 700px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--bc-shadow-md);
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  animation: bc-popup-in 0.18s ease;
}

.bc-calendar-popup--open {
  display: block;
}

@keyframes bc-popup-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.bc-calendar-popup .bc-calendar {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* ─── Notices ───────────────────────────────────────────────────────────── */
.bc-notice {
  padding: 0.6em 0.9em;
  border-radius: var(--bc-radius-sm);
}

.bc-notice--error {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  color: #C53030;
}

/* ─── Admin form ────────────────────────────────────────────────────────── */
#bc-overrides-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

#bc-overrides-wrapper td,
#bc-overrides-wrapper th {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

#bc-overrides-wrapper th {
  color: var(--bc-text-muted);
  text-align: left;
  border-bottom: 1.5px solid var(--bc-border);
  padding-bottom: 0.6rem;
}

#bc-overrides-wrapper tr:hover td {
  background: var(--bc-bg-hover);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .bc-calendar-popup {
    width: auto;
    min-width: 320px;
  }
}

@media (max-width: 640px) {
  .bc-calendar__grid {
    gap: 1rem;
  }

  :root {
    --bc-day-size: 36px;
  }

  .booking-calendar-page__body {
    flex-direction: column;
  }

  .bc-date-fields {
    flex-direction: column;
  }
}

/* ─── Loading shimmer ───────────────────────────────────────────────────── */
@keyframes bc-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bc-calendar--loading .bc-day:not(.bc-day--empty) {
  color: transparent !important;
  background: linear-gradient(
    90deg,
    var(--bc-bg-hover) 0%,
    #e0e0e0 50%,
    var(--bc-bg-hover) 100%
  ) !important;
  background-size: 200% 100% !important;
  animation: bc-shimmer 1.2s ease-in-out infinite !important;
  border-radius: 50% !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* ─── Desktop overlay (subtle blur behind popup) ────────────────────────── */
.bc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  z-index: 9400; /* below popup (9500) but above page content */
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.bc-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

/* ─── Backdrop (mobile sheet) ───────────────────────────────────────────── */
.bc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.bc-backdrop--visible {
  opacity: 1;
  pointer-events: all;
}

/* ─── Popup footer ──────────────────────────────────────────────────────── */
.bc-calendar-popup__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--bc-border);
  background: var(--bc-bg);
  gap: 1rem;
}

.bc-calendar-popup__footer-summary {
  flex: 1;
  min-width: 0;
  font-size: 0.88em;
  color: var(--bc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-calendar-popup__footer-clear {
  background: transparent;
  border-color: transparent;
  color: var(--bc-text-muted);
  font-size: 0.88em;
  padding: 0.35em 0.65em;
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bc-calendar-popup__footer-clear:hover {
  color: var(--bc-text);
  background: var(--bc-bg-hover);
  text-decoration: none;
}

.bc-calendar-popup__footer-done {
  background: var(--bc-accent);
  color: #fff;
  border-color: var(--bc-accent);
  font-weight: 600;
  flex-shrink: 0;
}

.bc-calendar-popup__footer-done:hover {
  background: var(--bc-accent-dark);
  border-color: var(--bc-accent-dark);
  color: #fff;
}

/* ─── Mobile bottom sheet ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .bc-calendar-popup {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--bc-radius-md) var(--bc-radius-md) 0 0 !important;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.15);
    animation: bc-sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards !important;
  }

  /* Drag handle */
  .bc-calendar-popup::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--bc-border);
    border-radius: 2px;
    margin: 12px auto 4px;
  }

  /* Keep footer visible at the bottom of the sheet */
  .bc-calendar-popup__footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    border-top: 1px solid var(--bc-border);
  }
}

@keyframes bc-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ─── Section reveal (progressive disclosure) ───────────────────────────── */
.bc-extras__inner {
  animation: bc-fade-in 0.22s ease;
}
