/* =========================================================
   v2.6.0 — production, accessibility and resilient states
   ========================================================= */
:root{--mg-focus:var(--blue,#00ADEF)}
html{scroll-padding-top:110px}
.mg-skip-link{position:fixed!important;left:12px!important;top:12px!important;z-index:10050!important;transform:translateY(-150%);padding:12px 16px!important;background:#fff!important;color:#111!important;border:2px solid var(--mg-focus);font-weight:800;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.mg-skip-link:focus{transform:translateY(0)}
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--mg-focus)!important;outline-offset:3px!important}
button,input,select,textarea{min-width:0}
.mg-inquiry-form label>span{display:block}
.mg-inquiry-form input:invalid:not(:placeholder-shown),.mg-inquiry-form textarea:invalid:not(:placeholder-shown){border-color:#a80000}
.mg-status[tabindex="-1"]:focus{outline:none}

/* Booking drawer works without animation libraries. */
.mg-book-drawer{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .22s ease,visibility .22s ease}
.mg-book-drawer[aria-hidden="true"]{opacity:0;visibility:hidden;pointer-events:none}
.mg-book-drawer-panel{transform:translateX(0);transition:transform .32s ease}
.mg-book-drawer[aria-hidden="true"] .mg-book-drawer-panel{transform:translateX(100%)}
.mg-book-drawer-backdrop{opacity:1;transition:opacity .22s ease}
.mg-book-drawer[aria-hidden="true"] .mg-book-drawer-backdrop{opacity:0}

/* Search and utility states. */
.mg-search-page,.mg-404{padding:clamp(90px,10vw,150px) 0;background:var(--cream);min-height:55vh}
.mg-search-results-head{max-width:760px;margin-bottom:48px}
.mg-search-results{display:grid;gap:16px}
.mg-search-card{padding:28px;background:#fff;border:1px solid var(--line)}
.mg-search-card h2{margin:0 0 10px;font-family:var(--display);font-size:calc(clamp(24px,2.3vw,34px) + 2px)}
.mg-search-card p{margin:0;color:var(--muted);line-height:1.7}
.mg-search-form{display:flex;gap:10px;max-width:680px;margin-top:26px}
.mg-search-form label{flex:1}.mg-search-form input{width:100%;height:52px;padding:0 14px;border:1px solid #cfcac0;background:#fff;font-size:18px}
.mg-404 h1{margin:.15em 0 .3em}.mg-404 p{max-width:640px;line-height:1.75}.mg-404 .mg-hero-actions{margin-top:28px}

/* Legal pages stay readable even when they use the generic page template. */
.mg-generic-page,.mg-prose{line-height:1.75}
.mg-prose{max-width:900px}.mg-prose h2{margin-top:1.5em}.mg-prose a{text-decoration:underline;text-underline-offset:3px}
.mg-footer-legal{display:flex;justify-content:center;gap:14px 26px;flex-wrap:wrap;margin:28px auto 0;font-size:14px}
.mg-footer-legal a{text-decoration:underline;text-decoration-color:rgba(255,255,255,.45);text-underline-offset:4px}

/* Consent is only rendered when GA4 has been configured. */
.mg-consent{position:fixed;left:20px;right:20px;bottom:20px;z-index:10030;display:flex;align-items:center;justify-content:space-between;gap:24px;max-width:1060px;margin-inline:auto;padding:18px 20px;background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:0 16px 48px rgba(0,0,0,.18)}
.mg-consent[hidden]{display:none!important}.mg-consent p{margin:4px 0 0;color:var(--muted);line-height:1.5}.mg-consent-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.mg-consent-actions a{text-decoration:underline;text-underline-offset:3px}

/* External weather widget: the wrapper disappears cleanly if the script is blocked. */
.mg-weather-shell{min-height:0}.mg-weather-shell.is-weather-failed .weatherwidget-io{display:none!important}
.mg-weather-fallback{display:none;padding:18px 20px;border:1px solid var(--line);background:#fff;line-height:1.55}
.mg-weather-shell.is-weather-failed .mg-weather-fallback{display:block}
.mg-weather-fallback a{font-weight:800;color:#007fae;text-decoration:underline;text-underline-offset:3px}

/* Admin-driven gallery tabs: allow keyboard users to see active/focus state clearly. */
.mg-gallery-tab[aria-selected="true"]{font-weight:800}

@media(max-width:760px){
  .mg-search-form{display:grid;grid-template-columns:1fr}.mg-search-form .mg-button{width:100%}
  .mg-consent{left:10px;right:10px;bottom:10px;display:block;padding:16px}.mg-consent-actions{margin-top:14px}.mg-consent-actions .mg-button{flex:1 1 180px;text-align:center}
  .mg-footer-legal{font-size:13px;gap:10px 18px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .mg-book-drawer{display:block!important}
  .mg-book-drawer-panel{transform:none!important}
  .mg-book-drawer[aria-hidden="true"]{visibility:hidden!important;opacity:0!important;pointer-events:none!important}
}
