/* CloudHost page elements (elements.go, multilang.go): FAQ, Galerie, Popup, Sprachen.
   Hooks on the site's own markup use zero specificity (:where), so the site's CSS always wins. */

/* popups stay hidden until their trigger (never on first paint) */
[data-cloudhost-popup]:not([data-qh-open]){display:none!important}

/* ---------- FAQ ---------- */
:where([data-cloudhost-faq] details){border-bottom:1px solid rgba(127,127,127,.3)}
:where([data-cloudhost-faq] summary){cursor:pointer;list-style:none;position:relative;padding:.9rem 2.25rem .9rem 0;font-weight:600}
:where([data-cloudhost-faq] summary)::-webkit-details-marker{display:none}
:where([data-cloudhost-faq] summary)::after{content:"+";position:absolute;right:.35rem;top:50%;transform:translateY(-50%);font-size:1.35em;line-height:1;font-weight:400}
:where([data-cloudhost-faq] details[open]>summary)::after{content:"\2212"}
:where([data-cloudhost-faq] summary:focus-visible){outline:2px solid currentColor;outline-offset:2px}
:where([data-cloudhost-faq] details>:not(summary)){margin:0 0 1rem}

/* ---------- Galerie ---------- */
:where([data-cloudhost-gallery]){display:grid;gap:var(--qh-gallery-gap,.5rem);
  grid-template-columns:repeat(auto-fill,minmax(min(var(--qh-gallery-min,180px),100%),1fr))}
@media (min-width:700px){
  :where([data-cloudhost-gallery][data-columns="2"]){grid-template-columns:repeat(2,1fr)}
  :where([data-cloudhost-gallery][data-columns="3"]){grid-template-columns:repeat(3,1fr)}
  :where([data-cloudhost-gallery][data-columns="4"]){grid-template-columns:repeat(4,1fr)}
  :where([data-cloudhost-gallery][data-columns="5"]){grid-template-columns:repeat(5,1fr)}
  :where([data-cloudhost-gallery][data-columns="6"]){grid-template-columns:repeat(6,1fr)}
}
:where([data-cloudhost-gallery] figure){margin:0}
:where([data-cloudhost-gallery] a){display:block}
:where([data-cloudhost-gallery] img){display:block;width:100%;height:auto;aspect-ratio:var(--qh-gallery-ratio,4/3);object-fit:cover;
  border-radius:var(--qh-gallery-radius,6px);background:rgba(127,127,127,.12);cursor:zoom-in}
:where([data-cloudhost-gallery] img:focus-visible,[data-cloudhost-gallery] a:focus-visible){outline:3px solid currentColor;outline-offset:2px}
:where([data-cloudhost-gallery] figcaption){font-size:.9em;margin-top:.35rem}

.qh-lb{position:fixed;inset:0;z-index:2147483600;display:flex;align-items:center;justify-content:center;background:rgba(10,10,12,.94);
  color:#fff;font:15px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;touch-action:pan-y pinch-zoom}
.qh-lb[hidden]{display:none}
.qh-lb figure{margin:0;display:flex;flex-direction:column;align-items:center;max-width:92vw}
.qh-lb img{display:block;max-width:92vw;max-height:82vh;width:auto;height:auto;object-fit:contain;border-radius:4px;user-select:none}
.qh-lb figcaption{margin-top:.6rem;text-align:center;max-width:70ch}
.qh-lb figcaption[hidden]{display:none}
.qh-lb button{position:absolute;display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:0;border-radius:999px;
  background:rgba(0,0,0,.55);color:#fff;font:28px/1 system-ui,sans-serif;cursor:pointer}
.qh-lb button:hover{background:rgba(255,255,255,.2)}
.qh-lb button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.qh-lb button[hidden]{display:none}
.qh-lb-x{top:12px;right:12px}
.qh-lb-p{left:12px;top:50%;transform:translateY(-50%)}
.qh-lb-n{right:12px;top:50%;transform:translateY(-50%)}
.qh-lb-c{position:absolute;top:24px;left:18px;margin:0;font-size:14px;opacity:.85}
@media (max-width:640px){.qh-lb-p,.qh-lb-n{top:auto;bottom:16px;transform:none}.qh-lb img{max-height:72vh}}

/* ---------- Popup ---------- */
.qh-pop-bg{position:fixed;inset:0;z-index:2147483500;display:flex;align-items:center;justify-content:center;padding:1rem;box-sizing:border-box;
  background:rgba(0,0,0,.45);animation:qh-fade .2s ease-out}
.qh-pop{position:relative;box-sizing:border-box;width:100%;max-width:32rem;max-height:85vh;overflow:auto;padding:1.5rem 1.5rem 1.25rem;
  box-shadow:0 24px 60px rgba(0,0,0,.3)}
/* colours with zero specificity: the site's CSS wins; or set --qh-popup-bg / --qh-popup-text / --qh-accent / --qh-on-accent */
:where(.qh-pop){background:var(--qh-popup-bg,#fff);color:var(--qh-popup-text,#111827);border-radius:14px}
.qh-pop:focus{outline:none}
.qh-pop>[data-cloudhost-popup]{display:block;margin:0}
/* popup from the dashboard switch (sitepopup.go); zero specificity, the site's CSS wins */
:where(.qh-site-popup) :where(.qh-pop-title){margin:0 2.2rem .5rem 0;font-size:1.3rem;line-height:1.25}
:where(.qh-site-popup) :where(.qh-pop-text){margin:0 0 1rem;line-height:1.5}
:where(.qh-site-popup) :where(.qh-pop-cta){margin:0}
:where(.qh-site-popup) :where(.qh-pop-btn){display:inline-block;padding:.7rem 1.2rem;border-radius:10px;background:var(--qh-accent,#111827);font-weight:600;text-decoration:none}
/* text colour above the page's a{color} (else: link colour on the dark button); a class rule of the page still wins */
.qh-pop-btn:where(a){color:var(--qh-on-accent,#fff)}
.qh-pop-x{position:absolute;top:.35rem;right:.35rem;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:inherit;
  font:28px/1 system-ui,sans-serif;cursor:pointer}
.qh-pop-x:hover{background:rgba(127,127,127,.15)}
.qh-pop-x:focus-visible{outline:2px solid currentColor}
@media (max-width:640px){
  .qh-pop-bg{align-items:flex-end;padding:0;background:rgba(0,0,0,.25)}
  .qh-pop{max-width:none;max-height:60vh;border-radius:16px 16px 0 0;padding:1.25rem 1.25rem 1rem;animation:qh-up .25s ease-out}
}
@keyframes qh-fade{from{opacity:0}to{opacity:1}}
@keyframes qh-up{from{transform:translateY(30%)}to{transform:none}}
@media (prefers-reduced-motion:reduce){.qh-pop-bg,.qh-pop{animation:none}}

/* ---------- Sprachen ---------- */
:where(.qh-lang){display:flex;flex-wrap:wrap;gap:.25rem .9rem;list-style:none;margin:0;padding:0}
:where(.qh-lang a[aria-current]){font-weight:700;text-decoration:none}
.qh-langhint{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:2147483400;display:flex;gap:.75rem;align-items:center;
  box-sizing:border-box;max-width:calc(100vw - 24px);padding:.5rem .5rem .5rem 1rem;border-radius:12px;background:#111827;color:#fff;
  font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.qh-langhint p{margin:0}
.qh-langhint a{color:#fff;font-weight:600;text-decoration:underline;white-space:nowrap}
.qh-langhint button{flex:none;width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:#fff;font:20px/1 system-ui,sans-serif;cursor:pointer}
.qh-langhint button:hover{background:rgba(255,255,255,.15)}
.qh-langhint a:focus-visible,.qh-langhint button:focus-visible{outline:2px solid #fff;outline-offset:2px}
/* mcpplace.go gapCSS (same text, TestPlacedGap): distance around blocks CloudHost placed and between blocks in a row */
:where([data-cloudhost-gap]){margin-block:2em}
:where(a[data-cloudhost-gap]:not([hidden])){display:flex;width:fit-content}
:where(a[data-cloudhost-gap]+a[data-cloudhost-gap]){margin-block-start:-1.25em}
:where(:is(main,body)>:is([data-cloudhost-hours=""],.cloudhost-newsletter,.cloudhost-form,.cloudhost-booking,[data-cms-list],[data-cloudhost-search])+:is([data-cloudhost-hours=""],.cloudhost-newsletter,.cloudhost-form,.cloudhost-booking,[data-cms-list],[data-cloudhost-search],.cloudhost-contact-std:not(.cloudhost-contact-float)),:is(main,body)>:is(.cloudhost-contact-std:not(.cloudhost-contact-float))+:is([data-cloudhost-hours=""],.cloudhost-newsletter,.cloudhost-form,.cloudhost-booking,[data-cms-list],[data-cloudhost-search])){margin-block-start:2em}
