/* Stay In Tramore website (kingnail/guidebook#36): the Airbnb-style date picker (picker.js), on the home page search and
   in each listing's price panel. Two months side by side from 761 px up, one month below; black circles for the arrival
   and leaving days with a light grey band for the nights between. Keep every rule scoped to .dp and its fields. */

.dpfield { display: grid; gap: 2px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: 14px; padding: 10px 14px; min-height: 52px; cursor: pointer; font-family: var(--font-body); color: var(--ink); }
.dpfield .k { font-size: .75rem; color: var(--ink-2); }
.dpfield .v { font-size: 1.02rem; font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }
.dpfield.set .v, .dpfield[aria-expanded="true"] .v { color: var(--ink); }
.dpfield[aria-expanded="true"], .dpfield:focus-visible { border-color: var(--ink); }
.dpfield:disabled { opacity: .5; cursor: default; }
.dpwrap { position: relative; }
/* on the home page the field sits in the search box's own field frame */
.search .field.dates { padding: 0; border: 0; gap: 4px; }
.search .field.dates label { padding: 0 14px; }
.search .field.dates .dpfield { min-height: 52px; }
.search form { grid-template-columns: 2fr 1fr auto; }
@media (max-width: 760px) { .search form { grid-template-columns: 1fr 1fr; } .search .field.dates { grid-column: 1 / -1; } }

.dp { background: var(--paper); border-radius: 24px; padding: 20px 22px 18px; color: var(--ink); display: grid; gap: 16px; text-align: left; }
.dp[hidden] { display: none; }
.dp button { font-family: var(--font-body); color: var(--ink); }
.dp button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* where it sits: a floating card below the home page's search box; on a listing page a floating card beside the page from
   961 px, and inline in the panel below that */
.search form { position: relative; }
.search .dp { position: absolute; top: calc(100% + 10px); left: 0; width: min(760px, 100%); z-index: 30; border: 1px solid var(--line); box-shadow: 0 14px 60px rgba(20, 16, 60, .28); }
@media (max-width: 760px) { .search .dp { left: 0; right: 0; width: auto; } }
.panel .dp { border: 1.5px solid var(--line); margin-top: 8px; padding: 16px; }
@media (min-width: 961px) {
  .panel { z-index: 8; }
  .panel .dp { position: absolute; top: calc(100% + 8px); right: -22px; width: min(740px, calc(100vw - 48px)); z-index: 30; padding: 20px 22px 18px; box-shadow: 0 14px 60px rgba(20, 16, 60, .28); }
}

/* the Dates | Flexible switch */
.dptabs { display: flex; justify-self: center; gap: 2px; padding: 4px; border-radius: 999px; background: #ececf0; }
.dptab { border: 0; background: transparent; border-radius: 999px; padding: 10px 24px; min-height: 44px; font-size: .98rem; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.dptab.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.dpbody { display: grid; gap: 14px; position: relative; }
.dpbody[hidden] { display: none; }

/* months and their arrows */
.dpnav { position: absolute; left: 0; right: 0; top: -2px; display: flex; justify-content: space-between; pointer-events: none; z-index: 1; }
.dparrow { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.dparrow svg { width: 16px; height: 16px; }
.dparrow:hover:not(:disabled) { background: #f0f0f4; }
.dparrow:disabled { opacity: .25; cursor: default; }
.dpmonths { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
.dpmonths[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpm { min-width: 0; }
.dpmh { display: block; text-align: center; font-size: 1rem; font-weight: 600; line-height: 44px; }
.dpg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dpg .dow { text-align: center; font-size: .75rem; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.dc { position: relative; height: 48px; display: grid; place-items: center; }
.dc.mid { background: #f0f0f2; }
.dc.ea::before, .dc.eb::before { content: ""; position: absolute; top: 0; bottom: 0; width: 50%; background: #f0f0f2; }
.dc.ea::before { right: 0; }
.dc.eb::before { left: 0; }
.dday { position: relative; z-index: 1; width: 44px; height: 44px; max-width: 100%; border-radius: 50%; border: 1.5px solid transparent; background: transparent; font-size: .95rem; font-weight: 500; cursor: pointer; padding: 0; }
.dday:hover:not([aria-disabled="true"]) { border-color: var(--ink); background: var(--paper); }
.dday.a, .dday.b { background: #111; color: #fff; border-color: #111; font-weight: 600; }
.dday.a:hover, .dday.b:hover { background: #111; color: #fff; }
.dday.in { color: var(--ink); }
.dday.past { color: #b4b4bc; cursor: default; font-weight: 400; }
.dday.off { color: #b4b4bc; text-decoration: line-through; cursor: default; font-weight: 400; }
.dday[aria-disabled="true"] { cursor: default; }

/* the row of chips */
.dpchiphead { margin: 4px 0 0; font-size: .85rem; color: var(--ink-2); }
.dpchips, .dpstays { display: flex; flex-wrap: wrap; gap: 8px; }
.dpchip, .dpstay { border: 1px solid #c9c9d2; background: var(--paper); border-radius: 999px; padding: 8px 16px; min-height: 44px; font-size: .95rem; font-weight: 500; cursor: pointer; }
.dpchip:hover, .dpstay:hover { border-color: var(--ink); }
.dpchip.on, .dpstay.on { border: 2px solid var(--ink); background: #f7f7f9; padding: 7px 15px; font-weight: 600; }
.dpstays { justify-content: center; }
.dpstay { min-width: 104px; padding-block: 12px; }
.dpstay.on { padding-block: 11px; }

/* Flexible */
.dph3 { margin: 6px 0 0; font: 600 1.1rem/1.3 var(--font-body); text-align: center; }
.dpstripwrap { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.dpcards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 8px; scrollbar-width: none; }
.dpcards::-webkit-scrollbar { display: none; }
.dpcard { flex: 0 0 112px; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border: 1px solid #c9c9d2; border-radius: 16px; background: var(--paper); cursor: pointer; min-height: 112px; align-content: center; }
.dpcard svg { width: 28px; height: 28px; margin-bottom: 4px; }
.dpcard b { font-weight: 600; font-size: .98rem; }
.dpcard span { font-size: .85rem; color: var(--ink-2); }
.dpcard:hover { border-color: var(--ink); }
.dpcard.on { border: 2px solid var(--ink); background: #f7f7f9; padding: 13px 7px; }
.dphint { margin: 0; text-align: center; font-size: .85rem; color: var(--ink-2); min-height: 1.2em; }

/* the foot */
.dpfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dpclear { border: 0; background: transparent; text-decoration: underline; font-size: .95rem; font-weight: 600; cursor: pointer; padding: 10px 4px; min-height: 44px; }
.dpfoot .btn, .panel .dpfoot .btn { width: auto; min-height: 48px; margin-left: auto; }
.dpgo:disabled { opacity: .45; cursor: default; }

@media (max-width: 760px) {
  .dp { padding: 14px 12px 14px; border-radius: 20px; }
  .dptab { padding-inline: 20px; }
  .dpstay { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
  .dpcard { flex-basis: 100px; }
}
@media (prefers-reduced-motion: no-preference) { .dday, .dpchip, .dpcard, .dpfield { transition: background-color .12s, border-color .12s; } }
