/* Enquiry form - replicates the IPD "Enquiry" design (Poppins, navy on light grey). */

/* Poppins, self-hosted from @fontsource/poppins 5.3.0 (SIL OFL 1.1, see /fonts/Poppins-OFL-LICENSE.txt).
   Served from this site rather than Google Fonts, whose per-browser CSS can't carry an SRI hash. */
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 400;
    src: url("/fonts/poppins-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 400;
    src: url("/fonts/poppins-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 500;
    src: url("/fonts/poppins-latin-ext-500-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 500;
    src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 600;
    src: url("/fonts/poppins-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 600;
    src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 700;
    src: url("/fonts/poppins-latin-ext-700-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 700;
    src: url("/fonts/poppins-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
    --navy: #1b3a78;          /* title, icon */
    --navy-label: #15306b;    /* field labels */
    --navy-button: #0d3b85;   /* Send button */
    --navy-button-hover: #0a2f6b;
    --accent-line: #1b3a78;   /* thin rule above the header bar */
    --header-bg: #e3e3e3;
    --panel-bg: #f4f5f7;
    --input-border: #d4d4d4;
    --input-text: #333333;
    --placeholder: #6e6e6e;   /* 5:1 on white - meets WCAG AA */
    --required: #d0021b;
    --error: #b3141b;
    --focus: #1b3a78;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--input-text);
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

main:focus {
    outline: none;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -40px;
    padding: 6px 12px;
    background: var(--navy-button);
    color: #fff;
    z-index: 10;
}

.skip-link:focus {
    top: 8px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Panel ---------------------------------------------------------- */
.enquiry-panel {
    max-width: 100%;
    margin: 0 auto;
    background: var(--panel-bg);
    border-top: 2px solid var(--accent-line);
}

.enquiry-header {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 37px;
    padding: 0 10px;
    background: var(--header-bg);
}

.enquiry-header__icon {
    width: 17px;
    height: 17px;
    flex: none;
    color: var(--navy);
}

.enquiry-header__title {
    margin: 0;
    color: var(--navy);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.enquiry-form {
    padding: 18px 21px 22px 21px;
}

/* ---- Fields --------------------------------------------------------- */
.field {
    margin-bottom: 7px;
}

.field label {
    display: block;
    margin: 0 0 3px 3px;
    color: var(--navy-label);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.4;
}

.req {
    margin-left: 3px;
    color: var(--required);
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 5px;
    border: 1px solid var(--input-border);
    border-radius: 0;
    background-color: #ffffff;
    color: var(--input-text);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 400;
}

.field input,
.field select {
    height: 24px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.field select {
    padding-left: 7px;
    padding-right: 24px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0h8L4 5z' fill='%23a9a9a9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 8px 5px;
    cursor: pointer;
}

.field textarea {
    min-height: 80px;
    padding: 5px;
    resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.btn-send:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

/* ---- Validation (text message + border, never colour alone) ---------- */
.field-error {
    display: block;
    margin: 2px 0 0 3px;
    color: var(--error);
    font-size: 11.5px;
    font-weight: 500;
}

.field-error:empty,
.field-validation-valid {
    display: none;
}

.field-hint {
    display: block;
    margin: 2px 0 0 3px;
    color: #4a4a4a;
    font-size: 11px;
}

.field-hint:empty {
    display: none;
}

.input-validation-error,
.field [aria-invalid="true"] {
    border-color: var(--error) !important;
}

/* ---- reCAPTCHA ------------------------------------------------------ */
.recaptcha {
    margin: 12px 0 10px 0;
    text-align: left; /* error message sits under the widget's left edge */
}

.g-recaptcha {
    display: flex;
    justify-content: flex-start; /* Google's fixed-width (304px) widget, left-aligned with the fields */
    min-height: 78px; /* reserve the widget's height to avoid layout shift */
}

/* ---- Send button ---------------------------------------------------- */
.btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 90px;
    height: 30px;
    margin: 6px 0 0 3px;
    padding: 0 18px;
    border: 0;
    border-radius: 2px;
    background: var(--navy-button);
    color: #ffffff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-send svg {
    width: 12px;
    height: 12px;
}

.btn-send:hover {
    background: var(--navy-button-hover);
}

.btn-send:disabled {
    opacity: 0.65;
    cursor: progress;
}

/* ---- IPDClick Registration Form (white page, two columns, BLACK labels) -- */
.reg-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 16px 56px;
}

.reg-title {
    margin: 0 0 22px;
    color: var(--navy);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}

.reg-intro {
    margin: 0 0 36px;
    color: #4a4a4a;
    font-size: 12.5px;
}

.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
    row-gap: 18px;
}

.reg-field label {
    display: block;
    margin: 0 0 6px;
    color: #000000;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
}

.reg-field input {
    display: block;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--input-border);
    border-radius: 0;
    background: #ffffff;
    color: var(--input-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
}

.reg-field input::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.reg-field input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.reg-field [aria-invalid="true"] {
    border-color: var(--error);
}

.reg-form .recaptcha {
    margin: 24px 0 18px;
}

.reg-form .btn-send {
    height: 36px;
    min-width: 100px;
    margin-left: 0;
}

@media (max-width: 720px) {
    .reg-grid {
        grid-template-columns: 1fr;
    }

    .reg-title {
        font-size: 26px;
    }
}

/* ---- Success popup (matches the Enquiry panel: navy rule, grey header) -- */
.sent-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-top: 2px solid var(--accent-line);
    border-radius: 2px;
    background: var(--panel-bg);
    color: var(--input-text);
    font-family: inherit;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Non-modal fallback (no JS): keep it centred near the top of the page. */
.sent-dialog[open]:not(:modal) {
    position: fixed;
    inset: 80px 0 auto 0;
    margin: 0 auto;
    z-index: 20;
}

.sent-dialog::backdrop {
    background: rgba(13, 25, 50, 0.45);
}

.sent-dialog__header {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 37px;
    padding: 0 12px;
    background: var(--header-bg);
}

.sent-dialog__title {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
}

.sent-dialog__body {
    padding: 16px 18px 18px;
}

.sent-dialog__body form {
    margin: 0;
}

.sent-reference {
    color: var(--navy-label);
    font-weight: 600;
    letter-spacing: 0.02em;
    word-break: break-all; /* long GUID wraps on narrow screens */
}

.sent-text {
    margin: 0 0 14px 3px;
    font-size: 12.5px;
}

@media (max-width: 480px) {
    .enquiry-form {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
