/* UK Hospitals, module facility-ux: opening status, phone action bar, "Was this page useful?". Tokens from assets/ukhc.css. */

/* ---------- live opening status ---------- */
.ukhc-fux-status{margin:0 0 16px}
.ukhc-fux-state{display:inline-flex;align-items:center;gap:8px;margin:0;padding:8px 14px;border-radius:999px;font-weight:700;font-size:1.05rem;
  background:var(--ukhc-teal-tint);color:var(--ukhc-ink);border:1px solid transparent}
/* printed by PHP as "Checking opening times…" with the same box, so the script only swaps the text (no layout shift) */
.ukhc-fux-status--pending .ukhc-fux-state{color:var(--ukhc-muted)}
/* phones: the longest texts ("Open now · closes Wednesday at 12:30am") take two lines, so two lines are always reserved */
@media (max-width:480px){.ukhc-fux-state{font-size:1rem;line-height:1.4;padding:8px 12px;border-radius:14px;box-sizing:border-box;min-height:calc(2.8em + 18px)}}
.ukhc-fux-dot{display:inline-block;width:11px;height:11px;border-radius:50%;background:var(--ukhc-muted);flex:none}
.ukhc-fux-status--open .ukhc-fux-state{background:var(--ukhc-live-tint);color:var(--ukhc-live-ink);border-color:#B9E5C9}
.ukhc-fux-status--open .ukhc-fux-dot{background:var(--ukhc-live);box-shadow:0 0 0 3px rgba(29,185,84,.25)}
.ukhc-fux-status--soon .ukhc-fux-state{background:var(--ukhc-amber-tint);color:#8A4700;border-color:#F2C893}
.ukhc-fux-status--soon .ukhc-fux-dot{background:var(--ukhc-amber)}
.ukhc-fux-status--closed .ukhc-fux-state{background:var(--ukhc-urgent-tint);color:#9E0C24;border-color:#F3C2CA}
.ukhc-fux-status--closed .ukhc-fux-dot{background:var(--ukhc-urgent)}
.ukhc-fux-bh{margin:10px 0 0;padding:10px 14px;background:var(--ukhc-amber-tint);border-left:5px solid var(--ukhc-amber);border-radius:4px;color:var(--ukhc-ink)}
@media (prefers-reduced-motion:no-preference){.ukhc-fux-status--open .ukhc-fux-dot{animation:ukhc-fux-pulse 2.4s ease-in-out infinite}}
@keyframes ukhc-fux-pulse{50%{box-shadow:0 0 0 6px rgba(29,185,84,0)}}

/* ---------- "Was this page useful?" ---------- */
.ukhc-fux-fb{margin:2rem 0 1rem;padding:14px 18px;background:var(--ukhc-card);border:1px solid var(--ukhc-line);border-radius:var(--ukhc-radius)}
.entry-content .ukhc-fux-fb-h{font-size:1.15rem;margin:0 0 .6rem;padding:0;border:0}
.ukhc-fux-fb-choice{display:flex;gap:10px;flex-wrap:wrap}
.ukhc-fux-fb-choice[hidden],.ukhc-fux-fb-more[hidden]{display:none}
.ukhc-fux-fb-choice .button-secondary{min-width:88px;min-height:44px}
.ukhc-fux-fb label{display:block;font-weight:700;color:var(--ukhc-ink);margin-bottom:4px}
.ukhc-fux-fb textarea{width:100%;max-width:40rem;border:2px solid var(--ukhc-muted);border-radius:6px;padding:8px;font:inherit}
.ukhc-fux-fb .button{border:0;cursor:pointer}
.ukhc-fux-fb-msg{margin:.6rem 0 0;font-weight:700;color:var(--ukhc-ink)}
.ukhc-fux-fb-msg:empty{display:none}
.ukhc-fux-print-url{display:none}

/* ---------- sticky action bar (phones only) ---------- */
.ukhc-fux-bar{display:none}
@media (max-width:768px){
  .ukhc-fux-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;gap:6px;
    padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:var(--ukhc-ink);box-shadow:0 -2px 10px rgba(11,46,59,.25)}
  .ukhc-fux-bar__btn{flex:1 1 0;display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:6px 8px;
    border-radius:6px;font-weight:700;font-size:1rem;line-height:1.1;text-decoration:none;cursor:pointer;
    background:#fff;color:var(--ukhc-ink);border:2px solid #fff;font-family:inherit}
  .ukhc-fux-bar__btn[hidden]{display:none}
  .ukhc-fux-bar__call{background:var(--ukhc-live);border-color:var(--ukhc-live);color:var(--ukhc-ink)}
  .ukhc-fux-bar__btn:hover,.ukhc-fux-bar__btn:focus{color:var(--ukhc-ink)}
  .ukhc-fux-bar__save[aria-pressed="true"]{background:var(--ukhc-teal-tint);border-color:var(--ukhc-teal-tint)}
  .ukhc-fux-bar__btn:focus-visible{outline:3px solid var(--ukhc-focus);outline-offset:2px;box-shadow:none}
  body.ukhc-fux-has-bar{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  /* keyboard focus and in-page links must not end up under the fixed bar (WCAG 2.2, 2.4.11; QA finding 11) */
  html:has(.ukhc-fux-bar){scroll-padding-bottom:calc(80px + env(safe-area-inset-bottom))}
  /* Kadence: hide the bar while the mobile menu drawer is open, and lift the scroll-to-top button above it */
  body[class*="showing-popup-drawer"] .ukhc-fux-bar{display:none}
  body.ukhc-fux-has-bar #kt-scroll-up,body.ukhc-fux-has-bar #kt-scroll-up-reader{bottom:calc(76px + env(safe-area-inset-bottom))!important}
}
