/* Livie G live build only (tools/build-site.mjs copies it to css/live.css): the frames around the two real plugin widgets, the contact, gift and new-student form status line and honeypot, the next open times line, the search box, and route rules the preview tied to the old student-portal slug.
   The widgets' own stylesheets are not restyled here: only their outer box, and the booking widget's palette through
   the --global-palette* variables it already reads (it was written for the Kadence theme). */

.lg-live{padding-top:var(--s4)}
/* widgets keep their width but start on the page's left edge, level with the heading and text around them */
.lg-widget{max-width:820px; margin-inline:0}
.lg-widget > :first-child{margin-top:0}

/* booking: site fonts and colours, nothing inside changed */
.lg-widget--booking{
  --global-palette1:var(--ink); --global-palette2:#2A2A2A; --global-palette3:var(--ink); --global-palette5:var(--mute);
  --global-palette7:var(--hair); --global-palette8:var(--wash); --global-palette9:var(--paper);
  border:2px solid var(--ink); border-radius:6px; padding:clamp(16px,3vw,32px); background:var(--paper)
}
.lg-widget--booking .lgb-app{font-family:inherit; max-width:none}

/* the student dashboard keeps its own game look and fonts; it only gets room */
.lg-widget--portal{max-width:980px}
.lg-widget--portal .lg-dash{margin-bottom:0}

.lg-live-more{margin-top:var(--s2)}

/* the student portal page printed inside the site shell (class-lgb-site.php portal_document; switch: Bookings > New
   website). Logged in: a short title row in place of the hero. The WordPress content gets the spacing scale: 24 px
   between blocks, whatever margins or empty lines the old page or another plugin carries. */
.lg-portal-head{padding:var(--s3) 0 0}
.lg-portal-head__in{display:flex; align-items:center; gap:var(--s2)}
.lg-portal-head__text{min-width:0}
.lg-portal-head__hi{font-size:16px; line-height:1.4; color:var(--mute); font-weight:500}
.lg-portal-head h1{font-size:clamp(32px,4.2vw,48px); line-height:1; margin-top:4px}
.lg-wp-page--in #student-portal--widget{padding-top:var(--s3); padding-bottom:var(--s5)}
.lg-wp-content{display:flex; flex-direction:column; gap:var(--s3)}
.lg-wp-content > *{margin-block:0 !important; min-width:0; max-width:100%}
.lg-wp-content h2, .lg-wp-content h3{line-height:1.15}
/* logged in: the old page's sign-up line and log-in link or form (tagged lg-wp-out by portal_content) */
.lg-wp-page--in .lg-wp-out,
.lg-wp-page--in .lg-wp-content #loginform,
.lg-wp-page--in .lg-wp-content .wp-block-loginout.logged-out{display:none !important}
/* its own rule: a browser without :has() drops only this one */
.lg-wp-page--in .lg-wp-content :is(.wp-block-button, .wp-block-buttons):not(:has(a:not(.lg-wp-out))){display:none !important}
/* phones: one 20 px page gutter, not the gutter plus the dashboard's own padding */
@media (max-width: 767px){
  .lg-wp-page .lg-wp-content .lg-dash, .lg-wp-page .lg-wp-content .lg-dash[data-lg-dashboard]{padding-left:0; padding-right:0; border-radius:0; background:none}
}

/* contact form */
.lg-form-status{min-height:1.5em}
.lg-form-status.is-ok{color:var(--ink); font-weight:700}
.lg-form-status.is-error{color:#B3261E; font-weight:700}
.form [aria-invalid="true"]{border-color:#B3261E !important}
.form button[disabled]{opacity:.6; cursor:progress}
/* the line under a field that needs a fix (contact.js, gift.js, intake.js): a mark and words, not colour alone */
.lg-field-err{display:flex; align-items:flex-start; gap:6px; margin:0; color:#B3261E; font-size:15px; line-height:1.35}
.lg-field-err__mark{flex:0 0 auto; margin-top:2px}
.lg-form-status:focus{outline:none}
.lg-form-status:focus-visible{outline:3px solid var(--ink); outline-offset:2px}
.lg-hp{position:absolute !important; left:-9999px; width:1px; height:1px; overflow:hidden}

/* new-student form: a hint under one field must not stretch the field beside it */
form[data-lg-intake] .form__row{align-items:start}

/* "next open times" (js/next-open.js): the room for the line is kept while the script runs, so nothing below moves
   when it fills in; without JavaScript (no .js on <html>) it takes no room */
.lg-next{margin:12px 0 0}
.lg-next:empty{margin:0}
.js .lg-next, .js .lg-next:empty{margin-top:12px; min-height:calc(2 * 1.55em)}
@media (max-width: 767px){ .js .lg-next, .js .lg-next:empty{min-height:calc(4 * 1.55em)} }
.lg-next .link{color:var(--ink); white-space:nowrap}

/* the preview hid the sticky price bar on phones on its student-portal page (the demo); here that page is the tour */
@media (max-width: 767px){ body[data-route="portal-tour"] .pbar{display:none} }

/* booking page: what to do if the booking form does not appear */
.lg-widget-help{max-width:820px; margin:var(--s2) 0 0; font-size:16px; color:var(--mute)}
.lg-widget-help .link{color:var(--ink)}

/* site search (404 and search pages) */
.lg-search{max-width:560px}
.lg-search__row{display:flex; gap:12px; align-items:stretch}
.lg-search__row input{flex:1 1 auto; min-width:0}
.lg-search__row .btn{flex:0 0 auto}
.pg-hero .lg-search{margin-top:32px}
.lg-search-count{font-size:16px; color:var(--mute)}
.lg-search-more{margin-top:var(--s4)}


/* reduced motion: hover and state transitions too (the animations already wait for no-preference). 0s, not a tiny
   duration: with any duration every property (visibility too) would transition, and a view the tools show and focus
   in the same step would still be hidden, so focus would fall to <body> */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{transition-duration:0s !important; transition-delay:0s !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important}
}
