/* ──────────────────────────────────────────────
   AVAILABILITY CALENDAR (booking date picker)
   Frosted-glass month picker that replaces the native <input type="date">.
   The real input stays in the DOM (sr-only) — see js/calendar.js.
─────────────────────────────────────────────── */
.gcal { position: relative; }

.gcal__native {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden;
}

.gcal__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  background: var(--g-fill-soft);
  border: 1px solid var(--g-border-soft);
  -webkit-backdrop-filter: var(--blur-sm);
  backdrop-filter: var(--blur-sm);
  color: var(--c-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.gcal__trigger:focus-visible,
.gcal.is-open .gcal__trigger {
  outline: none;
  border-color: rgba(16,198,216,0.6);
  box-shadow: 0 0 0 3px rgba(16,198,216,0.18);
}
.gcal__value--placeholder { color: var(--c-muted); }
.gcal__icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }

.field.is-invalid .gcal__trigger {
  border-color: #e23b3b;
  box-shadow: 0 0 0 4px rgba(226,59,59,0.12);
}

/* ── Popover ── */
.gcal__pop {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  z-index: 60;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--g-fill-strong);
  -webkit-backdrop-filter: var(--blur-lg);
  backdrop-filter: var(--blur-lg);
  border: 1px solid var(--g-border);
  box-shadow: var(--g-shadow-float), var(--g-inner);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top;
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.gcal.is-open .gcal__pop {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.gcal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.gcal__month { font-weight: 700; color: var(--c-text); text-transform: capitalize; }
.gcal__nav {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--g-fill-soft);
  border: 1px solid var(--g-border-soft);
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--t-fast), opacity var(--t-fast);
}
.gcal__nav svg { width: 18px; height: 18px; }
.gcal__nav:hover:not(:disabled) { background: rgba(16,198,216,0.16); }
.gcal__nav:disabled { opacity: 0.3; cursor: not-allowed; }

.gcal__wd {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin-bottom: 2px;
}
.gcal__wd span {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-muted);
  text-transform: capitalize;
  padding: 4px 0;
}

.gcal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.gcal__day {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  border: 0; background: transparent;
  border-radius: var(--r-sm);
  color: var(--c-text);
  font: inherit; font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.gcal__day--empty { cursor: default; }
.gcal__day:hover:not(:disabled) { background: rgba(16,198,216,0.16); }
.gcal__day--today:not(.is-selected) { box-shadow: inset 0 0 0 1px rgba(16,198,216,0.6); }
.gcal__day.is-selected { background: var(--grad-teal); color: #fff; font-weight: 700; }
.gcal__day:disabled {
  color: var(--c-muted);
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}
.gcal__day--blocked:disabled {
  background: rgba(226,59,59,0.10);
  text-decoration: line-through;
}

.gcal__hint {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  text-align: center;
}
