/**
 * Block pages (page-blocks.php): pages built from blocks in the WordPress editor (2026-11-09).
 *
 * Everything here hangs off a block style an editor picks in the editor's Styles panel (class is-style-<name>,
 * registered in inc/block-pages.php), so the design carries over to any page without code:
 *   Cover      "Hero band"            green band, or a photo with a dark overlay, full width under the header
 *   Group      "Page column"          the 1100px column (inside a hero band)
 *   Group      "Page body"            the 1100px column with the page's top and bottom space
 *   Group      "Two columns"          a two-column grid (one column under 860px)
 *   Group      "Section"              a block of content with a hairline rule above it
 *   Group      "Section, full width"  the same, across both columns of a grid
 *   Group      "Aside"                a side column of short headed notes (contact details)
 *   Paragraph  "Intro"                the larger opening paragraph
 *   Paragraph  "Note"                 a smaller, quieter line under a table or list
 *   Table      "Timeline"             year | event rows, no borders
 *   Table      "Rate table"           full-width rows with hairlines, last column right-aligned
 *   Button     "White", "Outline, white"   the buttons on a hero band
 * And the UVU Review form block (inc/form-blocks.php): .uvu-form and its fields.
 * Ported from the hand-built pages' .uvu-page system (inc/folded/uvureview-pages-from-content.php), same values.
 * Also loaded into the editor (with assets/css/editor.css), so pages look the same while being edited.
 */

.block-page {
    --uvu-green: var(--theme-primary-color, #00843d);
    --uvu-green-dark: var(--theme-primary-hover-color, #275D38);
    --uvu-rule: rgba(136, 136, 136, .35);
    --uvu-alert: #a3271a;
}

/* Not inside a game (blocks/game): the games are sized for the browser's default box model. :where() keeps the weight. */
.block-page *:where(:not(.single-game-page, .single-game-page *)),
.block-page *:where(:not(.single-game-page, .single-game-page *))::before,
.block-page *:where(:not(.single-game-page, .single-game-page *))::after {
    box-sizing: border-box;
}

/* Account pages (inc/account-blocks.php): the centred Forgot / Reset Password layouts, whose templates set the form side
   to width: 100% inline. */
.block-page .auth-page-centered > .auth-form-side {
    width: 100%;
}

/* Hero band */
.wp-block-cover.is-style-uvu-hero {
    width: 100vw;
    max-width: none;
    margin: 0 calc(-50vw + 50%);
    min-height: 0;
    padding: 4rem 0 3.5rem;
    align-items: flex-start;
    color: #fff;
}

.wp-block-cover.is-style-uvu-hero:has(> .wp-block-cover__image-background) {
    padding: 5.5rem 0 5rem;
}

.wp-block-cover.is-style-uvu-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin: 0 0 .75rem;
    max-width: 20ch;
    text-wrap: balance;
}

.wp-block-cover.is-style-uvu-hero p {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0 0 1.75rem;
    max-width: 52ch;
}

.wp-block-cover.is-style-uvu-hero p:last-child {
    margin-bottom: 0;
}

/* Page column, page body */
.wp-block-group.is-style-uvu-wrap,
.wp-block-group.is-style-uvu-body {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.wp-block-group.is-style-uvu-body {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

/* Intro */
p.is-style-uvu-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 70ch;
    margin: 0 0 2.5rem;
}

/* Two columns */
.wp-block-group.is-style-uvu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
}

/* Sections */
.wp-block-group.is-style-uvu-section,
.wp-block-group.is-style-uvu-section-wide {
    border-top: 1px solid var(--uvu-rule);
    padding-top: 1.25rem;
    min-width: 0;
}

.wp-block-group.is-style-uvu-section-wide {
    grid-column: 1 / -1;
}

.is-style-uvu-section h2,
.is-style-uvu-section-wide h2 {
    font-size: 1.5rem;
    margin: 0 0 .75rem;
}

.is-style-uvu-section p,
.is-style-uvu-section-wide p {
    margin: 0 0 .75rem;
    line-height: 1.6;
    max-width: 70ch;
}

.is-style-uvu-section p:last-child,
.is-style-uvu-section-wide p:last-child {
    margin-bottom: 0;
}

.is-style-uvu-section a,
.is-style-uvu-section-wide a {
    color: var(--uvu-green);
}

/* Timeline */
.wp-block-table.is-style-uvu-history {
    margin: 0;
    overflow: visible;
}

.wp-block-table.is-style-uvu-history table {
    width: auto;
    border-collapse: collapse;
}

.wp-block-table.is-style-uvu-history td,
.wp-block-table.is-style-uvu-history th {
    border: 0;
    padding: .3rem 1.5rem .3rem 0;
    vertical-align: top;
    text-align: left;
    line-height: 1.6;
}

.wp-block-table.is-style-uvu-history tr:first-child td {
    padding-top: 0;
}

.wp-block-table.is-style-uvu-history td:first-child {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wp-block-table.is-style-uvu-history td:last-child {
    max-width: 65ch;
    padding-right: 0;
}

/* Columns inside a section (a form beside its contact details): the hand-built pages' 3rem gap. WordPress ignores a
   block's own gap setting in a theme without theme.json, so it is set here. */
.wp-block-group.is-style-uvu-section > .wp-block-columns,
.wp-block-group.is-style-uvu-section-wide > .wp-block-columns {
    column-gap: 3rem;
}

/* Aside */
.is-style-uvu-aside h3 {
    font-size: 1.05rem;
    margin: 1.25rem 0 .25rem;
}

.is-style-uvu-aside h3:first-child {
    margin-top: 0;
}

.is-style-uvu-aside p {
    margin: 0;
    line-height: 1.6;
}

.is-style-uvu-aside a {
    color: var(--uvu-green);
}

/* Note */
p.is-style-uvu-note {
    font-size: .95em;
    opacity: .8;
}

/* Rate table */
.wp-block-table.is-style-uvu-table {
    margin: .25rem 0 .75rem;
}

.wp-block-table.is-style-uvu-table table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.wp-block-table.is-style-uvu-table thead {
    border: 0;
}

.wp-block-table.is-style-uvu-table th,
.wp-block-table.is-style-uvu-table td {
    text-align: left;
    padding: .5rem 0;
    border: 0;
    border-bottom: 1px solid var(--uvu-rule);
    vertical-align: top;
}

.wp-block-table.is-style-uvu-table th {
    font-weight: 600;
}

.wp-block-table.is-style-uvu-table th:last-child,
.wp-block-table.is-style-uvu-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

/* Buttons on a hero band */
.wp-block-buttons:has(> .is-style-uvu-light, > .is-style-uvu-ghost) {
    gap: .75rem;
}

.wp-block-button.is-style-uvu-light > .wp-block-button__link,
.wp-block-button.is-style-uvu-ghost > .wp-block-button__link {
    display: inline-block;
    padding: .8rem 1.25rem;
    border: 2px solid #fff;
    border-radius: var(--theme-border-radius, 5px);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.wp-block-button.is-style-uvu-light > .wp-block-button__link {
    background: #fff;
    color: var(--uvu-green);
}

.wp-block-button.is-style-uvu-light > .wp-block-button__link:hover {
    background: #f2f2ee;
    color: var(--uvu-green);
}

.wp-block-button.is-style-uvu-ghost > .wp-block-button__link {
    background: transparent;
    color: #fff;
}

.wp-block-button.is-style-uvu-ghost > .wp-block-button__link:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* Forms (UVU Review form block) */
.uvu-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.uvu-form > * {
    grid-column: 1 / -1;
}

.uvu-form > .uvu-field.is-half {
    grid-column: auto;
}

.uvu-field {
    display: grid;
    gap: .35rem;
}

.uvu-field label {
    font-weight: 600;
}

.uvu-help {
    margin: 0;
    font-size: .9rem;
    line-height: 1.5;
    opacity: .75;
}

.uvu-field input,
.uvu-field select,
.uvu-field textarea {
    width: 100%;
    min-height: 46px;
    padding: .65rem .8rem;
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--uvu-rule);
    border-radius: var(--theme-border-radius, 5px);
}

.uvu-field textarea {
    min-height: 140px;
    resize: vertical;
}

.uvu-field input:focus,
.uvu-field select:focus,
.uvu-field textarea:focus {
    outline: 2px solid var(--uvu-green);
    outline-offset: 1px;
    border-color: var(--uvu-green);
}

.uvu-check {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    line-height: 1.5;
}

.uvu-check input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: .25rem;
    flex: 0 0 auto;
    accent-color: var(--uvu-green);
}

.uvu-req {
    color: var(--uvu-alert);
}

.uvu-form .uvu-submit {
    justify-self: start;
    display: inline-block;
    padding: .85rem 1.5rem;
    border: 2px solid var(--uvu-green);
    border-radius: var(--theme-border-radius, 5px);
    background: var(--uvu-green);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.uvu-form .uvu-submit:hover {
    background: var(--uvu-green-dark);
    border-color: var(--uvu-green-dark);
}

.uvu-form .uvu-submit[disabled] {
    opacity: .6;
    cursor: default;
}

.uvu-legal {
    font-size: .85rem;
    opacity: .75;
    margin: 0;
}

.uvu-legal a {
    color: inherit;
}

.uvu-status {
    margin: 0;
    padding: .75rem 1rem;
    border: 1px solid var(--uvu-rule);
    border-radius: var(--theme-border-radius, 5px);
}

.uvu-status.ok {
    border-color: var(--uvu-green);
}

.uvu-status.err {
    border-color: var(--uvu-alert);
}

.uvu-status[hidden] {
    display: none;
}

.grecaptcha-badge {
    visibility: hidden;
}

[data-theme="dark"] .uvu-field input,
[data-theme="dark"] .uvu-field select,
[data-theme="dark"] .uvu-field textarea {
    background: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .wp-block-button.is-style-uvu-light > .wp-block-button__link:hover {
    background: #e6e6e1;
}

@media (prefers-reduced-motion: no-preference) {
    .wp-block-button.is-style-uvu-light > .wp-block-button__link,
    .wp-block-button.is-style-uvu-ghost > .wp-block-button__link {
        transition: background-color .15s ease;
    }
}

/* Embedded Google Form (staff application, Formfacade): its own stylesheets load after this one, hence the id scope
   and !important. Carried over from the hand-built page. */
.block-page .uvu-embed {
    margin-top: 2rem;
}

body .block-page #ff-compose .ff-form{background:transparent !important;box-shadow:none !important;border:0 !important;border-radius:0 !important;padding:0 !important;margin:0 !important;max-width:760px !important;font-family:inherit !important;font-size:1rem !important;line-height:1.6 !important}
body .block-page #ff-compose *:not(.material-icons){font-family:inherit !important}
body .block-page #ff-compose,body .block-page #ff-compose *:not(.rest-btn):not(.ff-linear-scale-button):not(.ff-required):not(.ff-widget-error){color:var(--theme-light-text,#292929) !important}
body .block-page #ff-compose .ff-banner-image,body .block-page #ff-compose .ff-editwidget,body .block-page #ff-compose .ff-submit-icon,body .block-page #ff-compose .ff-help-empty{display:none !important}
body .block-page #ff-compose .ff-title{font-family:'Playfair Display',Georgia,serif !important;font-size:1.5rem !important;font-weight:700 !important;margin:0 0 .75rem !important;padding:0 !important}
body .block-page #ff-compose .ff-description{font-size:1rem !important;line-height:1.6 !important;opacity:.9;margin:0 0 2rem !important;max-width:70ch}
body .block-page #ff-compose .ff-description ul{padding-left:1.25rem !important;margin:.5rem 0 !important}
body .block-page #ff-compose .ff-section{padding:1rem 0 !important;border:0 !important;background:transparent !important}
body .block-page #ff-compose .ff-item{margin:0 0 1.5rem !important;padding:0 !important}
body .block-page #ff-compose .ff-item-qs{display:block !important;font-size:1rem !important;font-weight:600 !important;margin:0 0 .35rem !important;line-height:1.4 !important}
body .block-page #ff-compose .ff-required{color:#a3271a !important;font-weight:600 !important;margin-left:.15rem}
body .block-page #ff-compose .ff-help{display:block !important;font-size:.9rem !important;line-height:1.5 !important;opacity:.75;margin:0 0 .5rem !important}
body .block-page #ff-compose input.rest-form-control,body .block-page #ff-compose textarea.rest-form-control,body .block-page #ff-compose select.rest-form-control{width:100% !important;min-height:46px !important;height:auto !important;padding:.65rem .8rem !important;font-size:1rem !important;background:rgba(255,255,255,.55) !important;border:1px solid rgba(136,136,136,.35) !important;border-radius:var(--theme-border-radius,5px) !important;box-shadow:none !important}
body .block-page #ff-compose textarea.rest-form-control{min-height:140px !important}
body .block-page #ff-compose .rest-form-control:focus{outline:2px solid var(--theme-primary-color,#00843d) !important;outline-offset:1px !important;border-color:var(--theme-primary-color,#00843d) !important;box-shadow:none !important}
body .block-page #ff-compose .ff-check-table{display:block !important;border:0 !important;background:transparent !important}
body .block-page #ff-compose .ff-form-check{display:flex !important;align-items:flex-start !important;gap:.6rem !important;padding:.3rem 0 !important;margin:0 !important;height:auto !important;min-height:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important}
body .block-page #ff-compose .ff-form-check-input{width:1.1rem !important;height:1.1rem !important;margin:.25rem 0 0 !important;flex:0 0 auto !important;accent-color:var(--theme-primary-color,#00843d) !important}
body .block-page #ff-compose .ff-form-check-label{display:block !important;font-size:1rem !important;line-height:1.5 !important;margin:0 !important;padding:0 !important;font-weight:400 !important}
body .block-page #ff-compose .ff-linear-scale-button{min-width:2.75rem !important;height:2.75rem !important;padding:0 .5rem !important;border:1px solid rgba(136,136,136,.5) !important;border-radius:var(--theme-border-radius,5px) !important;background:transparent !important;color:var(--theme-light-text,#292929) !important;font-size:1rem !important;box-shadow:none !important;margin:0 .35rem .35rem 0 !important}
body .block-page #ff-compose .ff-linear-scale-button.active,body .block-page #ff-compose .ff-linear-scale-button.selected,body .block-page #ff-compose .ff-linear-scale-button.ff-selected,body .block-page #ff-compose .ff-linear-scale-button[aria-pressed="true"]{background:var(--theme-primary-color,#00843d) !important;color:#fff !important;border-color:var(--theme-primary-color,#00843d) !important}
body .block-page #ff-compose .rest-btn{display:inline-flex !important;align-items:center !important;gap:.4rem !important;padding:.85rem 1.5rem !important;border-radius:var(--theme-border-radius,5px) !important;font-size:1rem !important;font-weight:600 !important;line-height:1.2 !important;box-shadow:none !important;text-transform:none !important;letter-spacing:0 !important;min-width:0 !important;height:auto !important}
body .block-page #ff-compose .rest-btn-primary{background:var(--theme-primary-color,#00843d) !important;border:2px solid var(--theme-primary-color,#00843d) !important;color:#fff !important}
body .block-page #ff-compose .rest-btn-primary:hover{background:var(--theme-primary-hover-color,#275D38) !important;border-color:var(--theme-primary-hover-color,#275D38) !important}
body .block-page #ff-compose .rest-btn-secondary{background:transparent !important;border:2px solid var(--theme-primary-color,#00843d) !important;color:var(--theme-primary-color,#00843d) !important}
body .block-page #ff-compose .ff-widget-error{color:#a3271a !important;font-size:.9rem !important}
html[data-theme="dark"] .block-page #ff-compose,html[data-theme="dark"] .block-page #ff-compose *:not(.rest-btn):not(.ff-linear-scale-button):not(.ff-required):not(.ff-widget-error){color:rgba(255,255,255,.85) !important}
html[data-theme="dark"] .block-page #ff-compose .rest-form-control{background:rgba(255,255,255,.06) !important}
html[data-theme="dark"] .block-page #ff-compose .ff-linear-scale-button{color:rgba(255,255,255,.85) !important;border-color:rgba(255,255,255,.35) !important}
html[data-theme="dark"] .block-page #ff-compose .rest-btn-secondary{color:#7fd19a !important;border-color:#7fd19a !important}
html[data-theme="dark"] .block-page #ff-compose .ff-description a{color:#7fd19a !important}

@media (max-width: 860px) {
    .uvu-form > .uvu-field.is-half {
        grid-column: 1 / -1;
    }

    .wp-block-group.is-style-uvu-grid {
        grid-template-columns: 1fr;
    }

    .wp-block-cover.is-style-uvu-hero {
        padding: 3rem 0 2.5rem;
    }

    .wp-block-cover.is-style-uvu-hero:has(> .wp-block-cover__image-background) {
        padding: 4rem 0 3.5rem;
    }
}

@media (max-width: 640px) {
    .wp-block-group.is-style-uvu-wrap,
    .wp-block-group.is-style-uvu-body {
        padding-left: 15px;
        padding-right: 15px;
    }
}
