/* Flexible dates picker (VRBO style) — markup: application/views/layouts/flexible-dates.php */
.flexdates { position: relative; }
.flexdates-raised { z-index: 1060 !important; }
.flexdates-trigger { cursor: pointer; }
.flexdates-trigger .form-control { height: 41px; background-color: #fff; cursor: pointer; }

.flexdates-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1050;
  width: 640px; max-width: calc(100vw - 32px);
  background: #fff; color: #333; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18); text-align: left;
}
.flexdates-panel[hidden] { display: none; }
.flexdates-head { display: none; }

.flexdates-tabs { display: flex; border-bottom: 1px solid #e5e5e5; }
.flexdates-tabs button {
  flex: 1; padding: 14px 8px; background: none; border: 0; border-bottom: 3px solid transparent;
  font-weight: 600; color: #555; cursor: pointer;
}
.flexdates-tabs button[aria-selected=true] { color: #008fb8; border-bottom-color: #00b2e8; }

.flexdates-pane { padding: 16px 20px 4px; }
.flexdates-pane[hidden] { display: none; }
.flexdates-pane h6 { text-align: center; font-weight: 700; margin: 4px 0 12px; text-transform: none; }
.flexdates-pane .small { text-align: center; margin-top: -6px; }

.flexdates-cal { display: flex; gap: 24px; }
.flexdates-month-cal { flex: 1; min-width: 0; }
.flexdates-cal-title { display: flex; align-items: center; justify-content: center; position: relative; height: 36px; margin-bottom: 6px; }
.flexdates-nav {
  position: absolute; top: 2px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #ddd; background: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.flexdates-nav[data-step="-1"] { left: 0; }
.flexdates-nav[data-step="1"] { right: 0; }
.flexdates-nav:disabled { opacity: .3; cursor: default; }
.flexdates-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.flexdates-dow { text-align: center; font-size: 12px; color: #888; padding: 4px 0; }
.flexdates-day {
  height: 38px; border: 0; background: none; border-radius: 50%; font-size: 14px; color: #333; cursor: pointer;
}
.flexdates-day:hover:not(:disabled) { box-shadow: inset 0 0 0 1px #333; }
.flexdates-day:disabled { color: #ccc; text-decoration: line-through; cursor: default; }
.flexdates-day.is-range { background: #e3f6fc; border-radius: 0; }
.flexdates-day.is-start, .flexdates-day.is-end { background: #00b2e8; color: #fff; font-weight: 700; }

.flexdates-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 0 6px; }
.flexdates-chip {
  min-height: 36px; padding: 6px 14px; border: 1px solid #bbb; border-radius: 20px;
  background: #fff; color: #333; font-size: 13px; cursor: pointer;
}
.flexdates-chip[aria-pressed=true] { border: 2px solid #008fb8; background: #e3f6fc; color: #006f8f; font-weight: 700; }

.flexdates-weekend { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; cursor: pointer; }
.flexdates-weekend input { width: 18px; height: 18px; }

.flexdates-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-bottom: 8px; }
.flexdates-month { margin: 0; cursor: pointer; }
.flexdates-month input { position: absolute; opacity: 0; pointer-events: none; }
.flexdates-month span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 76px; border: 1px solid #ccc; border-radius: 10px; font-size: 13px; line-height: 1.2;
}
.flexdates-month span .fa { font-size: 18px; color: #666; margin-bottom: 2px; }
.flexdates-month small { color: #777; }
.flexdates-month input:checked + span { border: 2px solid #008fb8; background: #e3f6fc; }
.flexdates-month input:focus-visible + span { outline: 2px solid #00b2e8; outline-offset: 2px; }

.flexdates-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px 16px; border-top: 1px solid #eee; }
.flexdates-foot .btn { margin: 0; }

/* results cards */
.property .flex-stay { margin-top: 8px; font-weight: 700; font-size: .92em; }

/* phones: full screen sheet */
@media (max-width: 767.98px) {
  body.flexdates-lock { overflow: hidden; }
  .flexdates-panel {
    position: fixed; inset: 0; top: 0; width: 100%; max-width: none; border-radius: 0;
    display: flex; flex-direction: column; z-index: 2000;
  }
  .flexdates-panel[hidden] { display: none; }
  .flexdates-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eee; }
  .flexdates-close { width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; }
  .flexdates-pane { flex: 1; overflow-y: auto; padding: 16px; }
  .flexdates-months { grid-template-columns: repeat(3, 1fr); }
  .flexdates-day { height: 44px; }
  .flexdates-chip { min-height: 44px; }
  .flexdates-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .flexdates-foot .btn { min-height: 44px; min-width: 120px; }
}
