/* Save the date: a calendar button with a little date tile, and a sheet that rises from the bottom of the phone to pick Google, Apple or another calendar. */
.calendar-link { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 0; margin: 22px 0 0; padding: 12px 16px 12px 12px; border: 1px solid #243a3b38; background: #fffdf7; color: var(--ink); text-align: left; box-shadow: 0 14px 26px -22px #243a3b; transition: border-color .25s, transform .25s var(--ease); }
.calendar-link:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.calendar-link:active { transform: scale(.985); }
.calendar-link > svg { width: 18px; height: 18px; color: var(--gold); }
.calendar-tile { flex: none; width: 50px; overflow: hidden; border: 1px solid #071f25; background: var(--paper); text-align: center; }
.calendar-tile small { display: block; padding: 3px 0 2px; background: #071f25; color: var(--gold-light); font: 600 8px/1.3 var(--sans); letter-spacing: 1.6px; }
.calendar-tile strong { display: block; padding: 3px 0 4px; font: 500 25px/1 var(--serif); color: #071f25; }
.calendar-copy { flex: 1; min-width: 0; }
.calendar-copy strong { display: block; font: 500 21px/1.15 var(--serif); letter-spacing: -.1px; }
.calendar-copy small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }

.calendar-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 92svh; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.calendar-sheet::backdrop { background: #071f25b3; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-inner { max-height: 92svh; overflow-y: auto; padding: 0 20px calc(18px + env(safe-area-inset-bottom)); background: url('assets/paper-grain.png') 0 0 / 96px, var(--paper); border-radius: 16px 16px 0 0; box-shadow: 0 -24px 48px -24px #000c; }
.sheet-inner:focus { outline: none; }
.sheet-head { padding: 10px 0 2px; text-align: center; touch-action: none; cursor: grab; }
.sheet-grabber { display: block; width: 38px; height: 4px; margin: 0 auto 18px; border-radius: 4px; background: #243a3b33; }
.sheet-head .eyebrow { color: var(--gold); }
.sheet-head h2 { margin: 4px 0 6px; font-size: 32px; letter-spacing: -.4px; }
.sheet-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.calendar-options { display: grid; gap: 8px; margin: 18px 0 8px; }
.calendar-option { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 11px 14px; border: 1px solid #243a3b24; border-radius: 4px; background: #fffdf8; transition: border-color .2s, background .2s; }
.calendar-option:hover { border-color: var(--gold); }
.calendar-option:active { background: #f1ebdc; }
.option-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #071f250d; color: #071f25; }
.option-icon svg { width: 20px; height: 20px; }
.option-copy { flex: 1; min-width: 0; }
.option-copy strong { display: block; font: 500 14.5px/1.35 var(--sans); }
.option-copy small { display: block; font-size: 12px; line-height: 1.45; color: var(--muted); }
.calendar-option > svg { width: 16px; height: 16px; color: var(--gold); }
.sheet-close { display: block; width: 100%; min-height: 50px; margin-top: 4px; border: 0; background: transparent; color: var(--muted); font-size: 13px; letter-spacing: .3px; }

.calendar-sheet[open] .sheet-inner { animation: sheet-rise .48s var(--ease) backwards; }
.calendar-sheet[open]::backdrop { animation: sheet-fade .3s ease both; }
.calendar-sheet.closing .sheet-inner { animation: sheet-fall .24s cubic-bezier(.5, 0, .75, 0) forwards; }
.calendar-sheet.closing::backdrop { animation: sheet-fade .24s ease reverse forwards; }
.calendar-sheet.dragging .sheet-inner { transition: none; }
.calendar-sheet .sheet-inner.settling { transition: transform .3s var(--ease); }
@keyframes sheet-rise { from { transform: translateY(100%); } }
@keyframes sheet-fall { to { transform: translateY(100%); } }
@keyframes sheet-fade { from { opacity: 0; } }

@media (min-width: 761px) {
  .calendar-link { max-width: 460px; }
  .calendar-sheet { inset: 0; width: min(440px, 100% - 48px); height: fit-content; margin: auto; }
  .sheet-inner { padding-bottom: 20px; border-radius: 6px; }
  .sheet-head { cursor: default; }
  .sheet-grabber { visibility: hidden; margin-bottom: 8px; }
  @keyframes sheet-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
  @keyframes sheet-fall { to { opacity: 0; transform: translateY(12px) scale(.98); } }
}
@media (prefers-reduced-motion: reduce) {
  .calendar-sheet .sheet-inner, .calendar-sheet::backdrop { animation: none !important; }
}
