/* ═══════════════════════════════════════════════════════════════
   OtelBilet — flight date picker (js/flight-cal.js)
   fc- prefix, literal values: it opens over style.css, b2b.css and
   results.css, whose tokens do not agree.
   Desktop: compact two-month popover (620px). Phone: bottom sheet.
   ═══════════════════════════════════════════════════════════════ */

.fc-layer { position: fixed; inset: 0; z-index: 1000; display: none; pointer-events: none; }
.fc-layer.open { display: block; }
.fc-scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, 0); transition: background .2s; }
html.fc-lock, html.fc-lock body { overflow: hidden; }

.fc-pop {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; border: 1px solid #e6eaf2;
  
  font-family: 'Inter', system-ui, -apple-system, sans-serif; color: #0f172a;
  padding: 14px 16px 0;
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.fc-layer.shown .fc-pop { opacity: 1; transform: none; }
.fc-pop *, .fc-pop *::before, .fc-pop *::after { box-sizing: border-box; }
.fc-pop button { font-family: inherit; }

/* info banner */
.fc-info {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 11px; margin-bottom: 10px; border-radius: 10px;
  background: #eef3fe; border: 1px solid #d9e4fb;
  font-size: 12.5px; line-height: 1.4; color: #1e293b;
}
.fc-info svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #0B3AD6; }
.fc-info.ok { background: #f1faf5; border-color: #d3eedd; }
.fc-info.ok svg, .fc-info b { color: #0E9F6E; }

/* months */
.fc-body { position: relative; }
.fc-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.fc-mt { text-align: center; font-size: 15px; font-weight: 800; height: 32px; line-height: 32px; margin-bottom: 4px; }
.fc-wd { display: grid; grid-template-columns: repeat(7, 1fr); }
.fc-wd span { text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8; padding: 2px 0 6px; }
.fc-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.fc-blank { height: 36px; }

.fc-nav {
  position: absolute; top: 0; z-index: 1;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid #e2e8f0; background: #fff; color: #0B3AD6; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.fc-prev { left: 0; }
.fc-next { right: 0; }
.fc-nav svg { width: 15px; height: 15px; }
.fc-nav:hover:not(:disabled) { border-color: #0B3AD6; background: #f5f8ff; }
.fc-nav:disabled { color: #cbd5e1; cursor: default; }

/* a day — range cells touch, so a selection reads as one band */
.fc-d {
  position: relative; z-index: 0;
  height: 36px; padding: 0; border: 0; background: transparent; color: #0f172a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}
.fc-pop.priced .fc-d, .fc-pop.priced .fc-blank { height: 42px; }
.fc-n { line-height: 1; }
.fc-p { font-size: 9.5px; font-weight: 700; color: #94a3b8; line-height: 1; letter-spacing: -.2px; white-space: nowrap; }
.fc-p.cheap { color: #0E9F6E; }
.fc-d.off { color: #cbd5e1; font-weight: 500; cursor: default; }
.fc-d:not(.off):not(.sel):hover::before {
  content: ''; position: absolute; inset: 0 2px; z-index: -1; border-radius: 8px; background: #eef3ff;
}
.fc-d.today::after {
  content: ''; position: absolute; inset: 0 3px; border-radius: 8px;
  border: 1.5px solid #0B3AD6; pointer-events: none;
}
.fc-d.in { background: #e8eeff; }
.fc-d.in.ls { border-radius: 8px 0 0 8px; }
.fc-d.in.le { border-radius: 0 8px 8px 0; }
.fc-d.in.ls.le { border-radius: 8px; }
.fc-d.sel { background: #0B3AD6; color: #fff; border-radius: 8px; }
.fc-d.sel.start { border-radius: 8px 0 0 8px; }
.fc-d.sel.end { border-radius: 0 8px 8px 0; }
.fc-d.sel .fc-p { color: rgba(255, 255, 255, .85); }
.fc-d.sel.ghost { background: #9db2f2; }
.fc-d.sel.today::after { display: none; }

/* footer */
.fc-foot {
  display: flex; align-items: center; gap: 8px;
  margin: 10px -16px 0; padding: 10px 16px; border-top: 1px solid #eef1f6;
}
.fc-status { flex: 1; min-width: 0; font-size: 12.5px; color: #64748b; }
.fc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 700;
}
.fc-btn svg { width: 12px; height: 12px; }
.fc-clear { background: #fff; color: #475569; border: 1px solid #e2e8f0; }
.fc-clear:hover { border-color: #94a3b8; }
.fc-done { background: #0B3AD6; color: #fff; border: 0; padding: 0 18px; }
.fc-done:hover { background: #0830b4; }

/* the field the picker belongs to */
.sb-field.fc-active { background: #fff !important; box-shadow: inset 0 0 0 2px #0B3AD6; }

/* ═══════════════════ phone: bottom sheet ═══════════════════ */
.fc-head { display: none; }
@media (max-width: 760px) {
  .fc-layer { pointer-events: auto; }
  .fc-layer.shown .fc-scrim { background: rgba(15, 23, 42, .45); }
  .fc-pop.fc-sheet {
    left: 0; right: 0; bottom: 0; top: auto;
    height: 86vh; height: 86dvh;
    border-radius: 20px 20px 0 0; border: 0; padding: 0;
    opacity: 1; transform: translateY(100%);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .fc-layer.shown .fc-pop.fc-sheet { transform: none; }
  .fc-sheet .fc-head { display: block; position: relative; padding: 18px 14px 0; border-bottom: 1px solid #eef1f6; flex: none; }
  .fc-handle { position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #d5dbe6; }
  .fc-sheet .fc-info { margin-bottom: 6px; }
  .fc-sheet .fc-status { display: block; text-align: center; font-size: 13px; padding: 2px 0 8px; }
  .fc-sheet .fc-wd span { padding-bottom: 8px; }
  .fc-sheet .fc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 10px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .fc-sheet .fc-mt { text-align: left; font-size: 16px; padding: 10px 4px 2px; height: auto; line-height: 1.2; }
  .fc-pop.fc-sheet .fc-d, .fc-pop.fc-sheet .fc-blank { height: 46px; }
  .fc-sheet .fc-d { font-size: 15px; }
  .fc-sheet .fc-p { font-size: 10px; }
  .fc-sheet .fc-foot { margin: 0; padding: 10px 14px; flex: none; }
  .fc-sheet .fc-btn { flex: 1; height: 48px; font-size: 15px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-pop, .fc-scrim { transition: none !important; }
}
