/* ==========================================================================
   MGD 2026 — WordPress layer
   Reconciles the design with real WordPress output: multi page rendering,
   nav menu markup, Gravity Forms, editor content.
   ========================================================================== */

/* --- 1. Multi page rendering -------------------------------------------- */
.page{ display:block; }
.mgd-section-team .card::before{ content:none; }

/* --- 2. Accessibility ---------------------------------------------------- */
.screen-reader-text{
  position:absolute; width:1px; height:1px;
  margin:-1px; padding:0; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%);
  white-space:nowrap; border:0;
}
.skip-link:focus{
  position:fixed; top:12px; left:12px; z-index:10000;
  width:auto; height:auto; margin:0; padding:.8em 1.3em;
  clip:auto; clip-path:none;
  background:var(--red); color:#fff;
  font-family:var(--display); font-stretch:112%; font-weight:700;
  font-size:.78rem; letter-spacing:.1em; text-transform:uppercase;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{ outline:2px solid var(--red-hot); outline-offset:2px; }

/* --- 3. Admin bar -------------------------------------------------------- */
body.admin-bar #site-nav{ top:32px; }
@media screen and (max-width:782px){ body.admin-bar #site-nav{ top:46px; } }

/* --- 4. Nav menu from WordPress ------------------------------------------ */
nav.menu .sub li{ display:block; }

/* --- 5. Gravity Forms ----------------------------------------------------
   Both MGD forms render inside a light band, so the light treatment is the
   default here and the dark one is scoped to .band.rink / .band.ice.       */
.gform_wrapper,
.gform_wrapper form{ margin:0; }

.gform_wrapper .gform_fields{
  list-style:none; margin:0; padding:0;
  display:grid; gap:18px;
}
.gform_wrapper .gfield{ margin:0; padding:0; }

.gform_wrapper .gfield_label,
.gform_wrapper label.gfield_label{
  display:block;
  font-family:var(--display); font-stretch:106%;
  font-size:.7rem; font-weight:700;
  letter-spacing:.13em; text-transform:uppercase;
  color:#5A6773; margin:0 0 7px;
}
.gform_wrapper .gfield_required{ color:var(--red); margin-left:.25em; }

.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper select,
.gform_wrapper textarea{
  width:100%; box-sizing:border-box;
  background:#fff;
  border:1px solid #C3CDD7;
  color:#0B0D0F;
  padding:.8em .9em;
  font-family:var(--body); font-size:.97rem;
  border-radius:2px;
}
.gform_wrapper textarea{ resize:vertical; min-height:92px; }
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus{ outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(210,22,42,.12); }
.gform_wrapper ::placeholder{ color:#8A95A0; opacity:1; }

.gform_wrapper select{
  appearance:none; -webkit-appearance:none;
  background-image:linear-gradient(45deg, transparent 50%, #5A6773 50%),
                   linear-gradient(135deg, #5A6773 50%, transparent 50%);
  background-position:calc(100% - 18px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  padding-right:2.4em;
}

.gform_wrapper .gform_footer{ margin:22px 0 0; padding:0; }
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"]{
  display:inline-flex; align-items:center; gap:.5em;
  font-family:var(--display); font-stretch:112%;
  font-weight:700; font-size:.79rem;
  letter-spacing:.1em; text-transform:uppercase;
  padding:1em 1.75em;
  border:2px solid var(--red); border-radius:2px;
  background:var(--red); color:#fff; cursor:pointer;
  transition:background .16s ease, border-color .16s ease;
}
.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover{ background:var(--red-deep); border-color:var(--red-deep); }

.gform_wrapper .validation_error{
  background:rgba(210,22,42,.08);
  border:1px solid var(--red); border-left:3px solid var(--red);
  color:#0B0D0F; padding:.9em 1.1em; margin:0 0 20px; font-size:.92rem;
}
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea{ border-color:var(--red); }
.gform_wrapper .validation_message{ color:var(--red-deep); font-size:.84rem; margin-top:6px; }
.gform_wrapper .gform_validation_container,
.gform_wrapper .gfield_visibility_hidden{ display:none !important; }
.gform_wrapper .gfield_description{ color:#6E7A86; font-size:.84rem; padding-top:6px; }

.gform_confirmation_message,
.mgd-confirm{
  background:#fff;
  border:1px solid #C3CDD7; border-left:3px solid var(--red);
  padding:24px 26px; border-radius:2px; color:#48535E;
}
.mgd-confirm h3{ margin-top:0; color:#0B0D0F; }
.mgd-confirm p{ margin-bottom:0; }

/* --- 5b. Longer form field types used by the camp registrations ---------
   Gravity Forms renders choices as div.gfield_radio > div.gchoice, and the
   field label as a <legend> inside a <fieldset>, so the selectors below
   target that structure rather than the older list markup.               */

.gform_wrapper fieldset.gfield{ border:0; margin:0; padding:0; }

.gform_wrapper legend.gfield_label,
.gform_wrapper .gform-field-label{
  display:block;
  font-family:var(--display); font-stretch:106%;
  font-size:.7rem; font-weight:700;
  letter-spacing:.13em; text-transform:uppercase;
  color:#5A6773; margin:0 0 7px; padding:0; float:none; width:auto;
}
/* Sub labels under name and address parts stay quiet and sentence cased. */
.gform_wrapper .gform-field-label--type-sub{
  font-family:var(--body); font-size:.78rem; font-weight:400;
  letter-spacing:0; text-transform:none;
  color:#6E7A86; margin:5px 0 0;
}

/* Section headers break the form into readable blocks: a short red rule
   over each title and room above it, instead of full-width hairlines. */
.gform_wrapper.gravity-theme .gfield.gsection,
.gform_wrapper .gsection{
  border:0; margin:30px 0 2px; padding:0;
}
.gform_wrapper.gravity-theme .gfield.gsection:first-child,
.gform_wrapper .gsection:first-child{ margin-top:0; }
.gform_wrapper .gsection_title::before{
  content:""; display:block; width:28px; height:3px;
  background:var(--red); margin-bottom:12px;
}
.gform_wrapper .gsection_title{
  font-family:var(--display); font-stretch:118%; font-weight:800;
  font-size:1.15rem; text-transform:uppercase; letter-spacing:-.005em;
  color:#0B0D0F; margin:0 0 .45em;
}
.gform_wrapper .gsection_description{
  font-family:var(--body); font-size:.92rem; line-height:1.6;
  color:#55616D; max-width:72ch; padding:0; margin:0;
  white-space:pre-line;
}

/* Choices: the boxes and circles. */
.gform_wrapper .gfield_radio,
.gform_wrapper .gfield_checkbox{ display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.gform_wrapper .gchoice{
  display:flex; align-items:flex-start; gap:.7em;
  background:#fff; border:1px solid #C3CDD7; border-radius:2px;
  padding:.8em .95em;
  transition:border-color .14s ease, background .14s ease;
}
.gform_wrapper .gchoice:hover{ border-color:var(--red); }
.gform_wrapper .gchoice:has(input:checked){ border-color:var(--red); background:rgba(210,22,42,.05); }
.gform_wrapper .gchoice label{
  font-family:var(--body); font-size:.95rem; font-weight:400;
  letter-spacing:0; text-transform:none;
  color:#2A333C; margin:0; cursor:pointer; line-height:1.45;
}
.gform_wrapper input.gfield-choice-input{
  appearance:none; -webkit-appearance:none;
  width:19px; height:19px; margin:1px 0 0; flex:none;
  border:2px solid #9AA6B1; background:#fff; cursor:pointer;
  display:grid; place-content:center;
  transition:border-color .14s ease, background .14s ease;
}
.gform_wrapper input.gfield-choice-input[type="radio"]{ border-radius:50%; }
.gform_wrapper input.gfield-choice-input[type="checkbox"]{ border-radius:2px; }
.gform_wrapper input.gfield-choice-input[type="radio"]:checked{ border-color:var(--red); }
.gform_wrapper input.gfield-choice-input[type="radio"]:checked::after{
  content:""; width:9px; height:9px; border-radius:50%; background:var(--red);
}
.gform_wrapper input.gfield-choice-input[type="checkbox"]:checked{ border-color:var(--red); background:var(--red); }
.gform_wrapper input.gfield-choice-input[type="checkbox"]:checked::after{
  content:""; width:5px; height:10px; margin-bottom:2px;
  border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg);
}

/* Name and address grids, in case the plugin grid is not present. */
.gform_wrapper .ginput_complex{ display:flex; flex-wrap:wrap; gap:12px; }
.gform_wrapper .ginput_complex > span{ flex:1 1 200px; min-width:0; display:block; }
.gform_wrapper .ginput_complex > span.ginput_full{ flex:1 1 100%; }

/* Date field. */
.gform_wrapper .gform-datepicker{ position:relative; max-width:260px; }
.gform_wrapper input.datepicker{ max-width:260px; }
.gform_wrapper .gform-datepicker-toggle{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  background:none; border:0; padding:4px; cursor:pointer; color:#6E7A86;
}
.gform_wrapper .gform-calendar-icon{ width:18px; height:18px; }

/* Required marker and description spacing. */
.gform_wrapper .gfield_required{ color:var(--red); margin-left:.3em; font-weight:700; }
.gform_wrapper .gfield_description{ color:#6E7A86; font-size:.86rem; padding-top:7px; white-space:pre-line; }

/* Dark context, if a form is ever placed on a rink band */
.band.rink .gform_wrapper .gfield_label,
.band.ice  .gform_wrapper .gfield_label{ color:var(--steel); }
.band.rink .gform_wrapper input,
.band.rink .gform_wrapper select,
.band.rink .gform_wrapper textarea,
.band.ice  .gform_wrapper input,
.band.ice  .gform_wrapper select,
.band.ice  .gform_wrapper textarea{
  background:var(--board-2); border-color:var(--line); color:var(--ink);
}

/* --- 6. Editor content (legacy pages, posts) ----------------------------- */
.mgd-editor-content{ color:var(--steel); }
.mgd-editor-content h1,
.mgd-editor-content h2,
.mgd-editor-content h3,
.mgd-editor-content h4{ margin-top:1.2em; }
.mgd-editor-content a{ color:var(--red-hot); text-decoration:underline; }
.mgd-editor-content img{ height:auto; margin:1.4em 0; }
.mgd-editor-content ul,
.mgd-editor-content ol{ padding-left:1.3em; margin:0 0 1em; }
.mgd-editor-content li{ margin-bottom:.4em; }
.mgd-editor-content table{ width:100%; border-collapse:collapse; margin:1.4em 0; }
.mgd-editor-content th,
.mgd-editor-content td{ border:1px solid var(--line); padding:.6em .8em; text-align:left; }
.mgd-editor-content th{ background:var(--board-2); }
.mgd-editor-content blockquote{ margin:1.4em 0; padding:.2em 0 .2em 1.2em; border-left:3px solid var(--red); }

/* --- 5c. "How did you find us?" chips --------------------------------------
   The source question on every signup form. Choices wrap as tappable chips
   rather than a tall stack; the whole chip is clickable because the native
   checkbox is stretched invisibly over it, which also keeps it in the tab
   order and readable by screen readers. Selectors carry .gfield so they
   outrank the Gravity Forms theme, which pins label width and padding.    */
.gform_wrapper .gfield.mgd-source .gfield_description{ padding:0 0 10px; margin:0; }
.gform_wrapper .gfield.mgd-source .gfield_checkbox{ display:flex; flex-wrap:wrap; gap:8px; }
.gform_wrapper .gfield.mgd-source .gchoice{
  position:relative; display:block; padding:0; margin:0;
  border-radius:999px; background:#fff; border:1px solid #C3CDD7;
}
.gform_wrapper .gfield.mgd-source .gchoice:hover{ border-color:var(--red); }
.gform_wrapper .gfield.mgd-source .gchoice input.gfield-choice-input{
  position:absolute; inset:0; width:100%; height:100%;
  margin:0; opacity:0; cursor:pointer; border:0; z-index:1;
}
.gform_wrapper .gfield.mgd-source .gchoice label{
  display:flex; align-items:center; gap:.5em; max-width:none; width:auto;
  padding:.6em 1.05em .6em .9em; margin:0;
  font-family:var(--body); font-size:.92rem; font-weight:600;
  letter-spacing:0; text-transform:none; white-space:nowrap;
  color:#2A333C; line-height:1.2;
}
.gform_wrapper .gfield.mgd-source .gchoice label::before{
  content:"+"; flex:none; width:.75em; text-align:center;
  font-weight:700; color:#8A95A0;
}
.gform_wrapper .gfield.mgd-source .gchoice:has(input:checked){ background:var(--red); border-color:var(--red); }
.gform_wrapper .gfield.mgd-source .gchoice:has(input:checked) label{ color:#fff; }
.gform_wrapper .gfield.mgd-source .gchoice:has(input:checked) label::before{ content:"\2713"; color:#fff; }
.gform_wrapper .gfield.mgd-source .gchoice:has(input:focus-visible){ outline:2px solid var(--red); outline-offset:2px; }
.gform_wrapper .gfield_error.mgd-source .gchoice{ border-color:var(--red); }

/* --- 7. Pagination -------------------------------------------------------- */
.pagination .page-numbers{
  display:inline-block; padding:.55em .95em;
  border:1px solid var(--line); color:var(--steel);
  margin-right:6px;
  font-family:var(--display); font-stretch:106%;
  font-size:.74rem; letter-spacing:.08em; text-transform:uppercase;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover{ border-color:var(--red); color:var(--white); }

/* --- 8. Motion ------------------------------------------------------------ */
@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  .testi-slide{ transition:none !important; }
  /* The hero video is stopped by main.js rather than hidden, so the
     poster frame still carries the section instead of leaving it bare. */
}

/* --- 9. Home page announcement bar ----------------------------------------- */
.promo-bar{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:center;
  gap:6px 18px; min-height:44px; padding:10px 20px;
  background:var(--red); color:#fff;
  font-family:var(--display); font-stretch:112%; font-weight:700;
  font-size:.76rem; letter-spacing:.1em; text-transform:uppercase; text-align:center;
  transition:background .16s ease;
}
.promo-bar:hover{ background:var(--red-deep); color:#fff; }
.promo-bar:focus-visible{ outline:2px solid #fff; outline-offset:-5px; }
.promo-bar__sep{ opacity:.55; }
.promo-bar__cta{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px; border:2px solid #fff; border-radius:2px;
}
.promo-bar__cta svg{ flex:none; transition:transform .2s cubic-bezier(.2,.7,.3,1); }
.promo-bar:hover .promo-bar__cta svg{ transform:translateX(3px); }
@media (max-width:640px){
  .promo-bar{ gap:6px 10px; padding:8px 14px; font-size:.7rem; letter-spacing:.08em; }
  .promo-bar__extra{ display:none; }
}
