/* ============================================================
   FRAME DIALOGS: Request Care and the job application.
   The site's own .modal / .modal-card dialog with a header row
   (title, "Open in a new tab", close button) and an iframe.
   Markup: inc/frame-dialog.php. Behaviour: js/frame-dialog.js.
   ============================================================ */

/* Visible the moment it opens (only the fade animates), so focus can move
   into it straight away. Closing keeps the shared .modal fade-out. */
.hhc-fd.is-open{transition:opacity .28s var(--ease,cubic-bezier(.22,1,.36,1))}
.hhc-fd .hhc-fd-card{width:min(880px,100%);height:min(900px,calc(100vh - 2.5rem));
  max-height:none;padding:0;display:flex;flex-direction:column;overflow:hidden}
@supports (height:100dvh){
  .hhc-fd .hhc-fd-card{height:min(900px,calc(100dvh - 2.5rem))}
}
.hhc-fd-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;
  padding:1.35rem 1rem 1rem 1.5rem;border-bottom:1px solid var(--border,#DDE3DE);flex:0 0 auto}
.hhc-fd-heading{min-width:0}
.hhc-fd-heading h2{margin:0}
.hhc-fd-heading p{margin:.2rem 0 0;font-size:.9rem;color:var(--muted)}
.hhc-fd-heading a{color:#1C3D5A;font-weight:600;text-underline-offset:3px;white-space:nowrap}
.hhc-fd-close{flex:0 0 auto;display:grid;place-items:center;width:46px;height:46px;
  border-radius:50%;background:#F4F6F5;border:1px solid var(--border,#DDE3DE);color:#16241F;
  cursor:pointer;transition:background-color .2s ease,transform .3s ease}
.hhc-fd-close:hover{background:#E7F1E8;transform:rotate(90deg)}
.hhc-fd-close:focus-visible{outline:3px solid #16241F;outline-offset:2px}
.hhc-fd-close svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.hhc-fd-body{position:relative;flex:1 1 auto;min-height:0;background:#fff}
.hhc-fd-frame{display:block;width:100%;height:100%;border:0}
.hhc-fd-loading{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:1.5rem;
  text-align:center;color:var(--muted);pointer-events:none}
.hhc-fd.is-loaded .hhc-fd-loading{display:none}
.hhc-fd-sentinel{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Phones: the form gets the whole screen. */
@media (max-width:580px){
  .hhc-fd{padding:0}
  .hhc-fd .hhc-fd-card{width:100%;height:100%;border-radius:0}
  .hhc-fd .hhc-fd-card::before{border-radius:0}
  .hhc-fd-head{padding:1rem .75rem .85rem 1rem}
  .hhc-fd-heading h2{font-size:1.3rem}
}

@media (prefers-reduced-motion:reduce){
  .hhc-fd-close,.hhc-fd-close:hover{transition:none;transform:none}
}
@media (forced-colors:active){
  .hhc-fd-close{border:1px solid CanvasText}
}
