/* chooser.css — "Open in Maps" / "Add to calendar" / "Subscribe to the INHSA calendar" (lib/chooser.js; build spec
   "maps-calendar" §9, the same class names as the websites' choosers). Loaded by the family pages that show a Bee
   (parent/index.html, parent/register.html). Colors come only from the app.css tokens. The popover is absolute in page
   coordinates (JS sets left/top through the CSSOM) and the phone sheet is in the top layer: neither moves the page. */

.event-info > * + * { margin-top: 14px; }
.chooser-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chooser { display: inline-flex; max-width: 100%; }

.chooser-btn { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; margin: 0; padding: .45em 1.05em;
  border: 2px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--pine);
  font: inherit; font-size: .95rem; font-weight: 800; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer; }
.chooser-btn:hover { border-color: var(--forest); background: var(--sage); color: var(--pine); }
.chooser-btn[aria-expanded="true"] { border-color: var(--forest); background: var(--sage); }
.chooser-btn svg { flex: none; }
.chooser-btn-lg { min-height: 48px; padding: .6em 1.25em; font-size: 1rem; background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.chooser-btn-lg:hover, .chooser-btn-lg[aria-expanded="true"] { background: var(--pine); border-color: var(--pine); color: var(--on-forest); }

.subscribe { padding-top: 14px; border-top: 1px solid var(--line); }
.chooser-note { margin: 8px 0 0; font-size: .88rem; color: var(--muted); max-width: 60ch; }

dialog.chooser-pop { width: max-content; min-width: 220px; max-width: min(360px, calc(100vw - 32px)); max-height: none; margin: 0;
  padding: 12px; border-radius: var(--r); z-index: 40; overflow: visible; }
dialog.chooser-pop:not(.sheet) { position: absolute; inset: auto; }
dialog.chooser-pop.placing { visibility: hidden; } /* while lib/chooser.js measures and places it */
dialog.chooser-pop.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 85vh; max-height: 85dvh; overflow: auto;
  border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 18px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.chooser-head { padding: 0 12px; }
.chooser-title { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.chooser-sub { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.chooser-list { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; }
.chooser-option { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 8px 12px;
  border-radius: var(--r-sm); color: var(--pine); text-decoration: none; }
.chooser-option:hover, .chooser-option:focus-visible { background: var(--sage); color: var(--pine); }
.chooser-option:focus-visible { outline-offset: -3px; }
.chooser-hint { font-size: .85rem; font-weight: 600; color: var(--muted); }
.chooser-foot { margin: 8px 0 0; padding: 0 12px; font-size: .85rem; color: var(--muted); }
.chooser-status { margin: 6px 12px 0; font-size: .9rem; font-weight: 700; color: var(--forest); }
.chooser-status:empty { display: none; }
.chooser-status label { display: block; margin-bottom: 4px; color: var(--pine); }
.chooser-copy { width: 100%; }
.chooser-cancel { width: 100%; margin-top: 12px; }

@media (prefers-reduced-motion: no-preference) {
  dialog.chooser-pop.sheet[open] { animation: chooser-up .16s ease-out; }
}
@keyframes chooser-up { from { transform: translateY(100%); } to { transform: none; } }
@media print {
  .chooser, .chooser-row, .subscribe, dialog.chooser-pop { display: none !important; }
}
@media (forced-colors: active) {
  .chooser-btn, dialog.chooser-pop { border: 2px solid ButtonText; }
}
