/* ============================================================
   Public Process Submission V2 — page chrome + email/phone block
   Loaded only by public_create_evaluation_v2.jsp.
   Builds on top of process_questionnaire_v2.css (the V2 questionnaire is
   designed for an in-app slider; here we adapt it for a full page).
   ============================================================ */

/* ---------- Page wrapper ---------- */
html, body.v2-pub-body {
    height: 100%;
    margin: 0;
    background: var(--v2-pq-bg-color, #F0F2FD);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.v2-pub-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--v2-pq-bg-color, #F0F2FD);
}

/* Optional decorative background image (legacy compat) */
.v2-pub-bg {
    display: none;
}

/* ---------- Header (full-page override of v2-pq-header) ---------- */
.v2-pub-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FFFFFF;
    border-bottom: 1px solid #EDEEF0;
    height: 72px;
    padding: 0 36px;
}

.v2-pub-header .v2-pq-header-logo {
    flex: 0 0 auto;
}

.v2-pub-header-logo .v2-pq-header-logo-img {
    max-height: 40px;
    width: auto;
}

/* Center title block already gets correct styles from process_questionnaire_v2.css */

/* ---------- Centered-title (default on; eval config PUBLIC_PROCESS_V2_HEADER_INTRO_ENABLED="false" hides) ----------
   The shared header is a 3-column flex (logo | center | actions). The logo
   column is auto-width while the actions column reserves 252px (sized for the
   in-app Close + Submit pair), so the flex:1 center band is not symmetric about
   the page center and the title drifts left. Balancing the two side columns to
   equal flexible width lets the auto-width center sit at the true page center.
   The double-class selector (0,3,0) outranks `.v2-pub-header .v2-pq-header-*`
   (0,2,0) regardless of source order. */
.v2-pub-header.v2-pub-header--centered .v2-pq-header-logo,
.v2-pub-header.v2-pub-header--centered .v2-pq-header-right {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    /* Clear the base `.v2-pq-header-logo { max-width: 120px }` / `.v2-pq-header-right
       { width: 252px }` caps — otherwise the capped side can't grow to match the
       other and the auto-width center is pushed off the page centre. */
    max-width: none;
}
.v2-pub-header.v2-pub-header--centered .v2-pq-header-center {
    flex: 0 1 auto;
}

/* ---------- Validation error bar (sticky below 72px page header) ---------- */
.v2-pub-error-bar {
    position: sticky;
    top: 72px;
    z-index: 99;
}

@media (max-width: 768px) {
    .v2-pub-error-bar {
        top: 56px;
    }
}

/* ---------- Container override (no slider chrome) ----------
   The shared questionnaire stylesheet sets `.v2-pq-container` and
   `#v2PqReportForm` to `overflow: hidden` (so the auth slider can use
   `.v2-pq-body` as its scroll container). In the public flow the page
   itself scrolls — any ancestor with `overflow: hidden` becomes the
   scroll context for `position: sticky`, but it doesn't actually scroll,
   so the section/subsection bars never stick. Flip those ancestors to
   `overflow: visible` so sticky resolves against the window again. */
.v2-pub-container.v2-pq-container {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Flex chain so the submit footer pins to the viewport bottom when
   page content is shorter than the viewport. `position: sticky` on its
   own only kicks in while the page scrolls; with a single-question
   form the page doesn't scroll, so the footer would otherwise sit at
   the natural end of `.v2-pq-body` with empty page below it. Extending
   `display: flex; flex-direction: column` through form -> body lets the
   final child (the submit footer) push down via `margin-top: auto`. */
.v2-pub-page #v2PqReportForm {
    overflow: visible;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.v2-pub-container .v2-pq-body {
    height: auto;
    overflow: visible;
    padding-bottom: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.v2-pub-container .v2-pq-body > .v2-pq-submit-footer {
    margin-top: auto;
}

/* ---------- Email / Phone block (above first section) — Figma 1288:84586 ---------- */
.v2-pub-userinfo {
    width: 100%;
    margin: 0;
    max-width: none;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
}

.v2-pub-userinfo-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    background: #FFFFFF;
    padding: 12px 14px;
}

/* ---------- Objective / Instructions intro card (default on; eval config PUBLIC_PROCESS_V2_HEADER_INTRO_ENABLED="false" hides) ----------
   Sits at the top of the questionnaire body, aligned to the same 980px content
   column as the section/question cards. */
.v2-pub-intro {
    max-width: 980px;
    width: 100%;
    margin: 16px auto 0;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid #EDEEF0;
    border-radius: 0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    /* Spacing between the OBJECTIVE and INSTRUCTIONS blocks (designer spec). */
    gap: 24px;
}

.v2-pub-intro-label {
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #8A8A8A;
    /* Spacing between a block's title (OBJECTIVE/INSTRUCTIONS) and its text (designer spec). */
    margin-bottom: 8px;
}

.v2-pub-intro-text {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: #3D3D3D;
    white-space: pre-wrap;
    word-break: break-word;
}

.v2-pub-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 300px;
    flex: 0 0 300px;
}

.v2-pub-field-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #5C5C5C;
    line-height: 24px;
    margin: 0;
}

.v2-pub-mand {
    color: #E04545;
    margin-left: 2px;
    font-weight: 700;
}

.v2-pub-input {
    height: 44px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 6px 0 14px;
    border: 1px solid #D6D6D6;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #1F1F1F;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.v2-pub-input::placeholder {
    color: #C2C2C2;
}

.v2-pub-input:focus,
.v2-pub-input:hover {
    border-color: #4F66E4;
    box-shadow: 0 0 0 3px rgba(79, 102, 228, 0.12);
}

.v2-pub-input.error {
    border-color: #E04545;
    box-shadow: 0 0 0 3px rgba(224, 69, 69, 0.10);
}

.v2-pub-field-error {
    font-size: 12px;
    color: #E04545;
    margin-top: 6px;
    line-height: 16px;
    min-height: 0;
    display: none;
}

.v2-pub-field-error.show {
    display: block;
}

/* ---------- Phone field with intl-tel-input v16.0.8 (separateDialCode mode) ----------
   Plugin v16 uses BEM-style classes (.iti, .iti__selected-flag, .iti__arrow, etc.).
   Figma node 1288:84612 — 300px x 44px outer shell with grey-50 inline dropdown
   on the left containing flag + dial code + 20x20 chevron, then the input. */
.v2-pub-phone-wrap {
    position: relative;
    width: 100%;
}

/* Outer plugin wrapper (.iti) — carries the V2 input shell border + shadow */
.v2-pub-phone-wrap .iti {
    width: 100%;
    display: block;
    position: relative;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid #D6D6D6;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.v2-pub-phone-wrap .iti:hover,
.v2-pub-phone-wrap .iti:focus-within {
    border-color: #4F66E4;
    box-shadow: 0 0 0 3px rgba(79, 102, 228, 0.12);
}

.v2-pub-phone-wrap.error .iti {
    border-color: #E04545;
    box-shadow: 0 0 0 3px rgba(224, 69, 69, 0.10);
}

/* Plugin's flag container is absolute-positioned (left:0, top:0, bottom:0).
   Add a right border to separate the dropdown from the input. */
.v2-pub-phone-wrap .iti--separate-dial-code .iti__flag-container {
    height: 100%;
    border-right: 1px solid #EBEBEB;
}

/* Selected flag (visible part of the dropdown) — Figma node 1288:84613 */
.v2-pub-phone-wrap .iti--separate-dial-code .iti__selected-flag {
    height: 100%;
    padding: 0 12px 0 14px;
    border-radius: 8px 0 0 8px;
    background: #FAFAFA;
    display: flex;
    align-items: center;
    gap: 4px;
}

.v2-pub-phone-wrap .iti--separate-dial-code .iti__selected-flag:hover,
.v2-pub-phone-wrap .iti--separate-dial-code .iti__flag-container:hover .iti__selected-flag {
    background: #F2F2F2;
}

/* Dial code text "+91" — Lato Regular 16/24 #1F1F1F (override plugin's margin-left:6px) */
.v2-pub-phone-wrap .iti--separate-dial-code .iti__selected-dial-code {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #1F1F1F;
    margin-left: 0;
}

/* Chevron — replace plugin's tiny CSS triangle with a 20x20 chevron-down icon */
.v2-pub-phone-wrap .iti__arrow {
    width: 20px;
    height: 20px;
    margin-left: 0;
    border: none;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='M5 7.5l5 5 5-5' stroke='%231F1F1F' stroke-width='1.67' stroke-linecap='round' stroke-linejoin='round'/></svg>") center center / 20px 20px no-repeat;
    transition: transform 0.15s ease;
}

.v2-pub-phone-wrap .iti__arrow--up {
    transform: rotate(180deg);
    border: none;
}

/* Phone input — borderless inside the V2 shell; preserve plugin's auto-injected
   padding-left (set inline by the plugin to clear the absolute flag container).
   Only override padding-right + padding-top/bottom and remove the border/bg. */
.v2-pub-phone-wrap .iti input[type="tel"].v2-pub-phone-input {
    height: 100%;
    padding-top: 0;
    padding-right: 6px;
    padding-bottom: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

.v2-pub-phone-wrap .iti input[type="tel"].v2-pub-phone-input:focus,
.v2-pub-phone-wrap .iti input[type="tel"].v2-pub-phone-input:hover {
    border: none;
    box-shadow: none;
}

/* ---------- Body inner: per-question white cards on indigo page ---------- */
.v2-pub-body-inner {
    padding: 0;
}

.v2-pub-body-inner .v2-pq-section-wrap {
    background: transparent;
    margin: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

/* ---------- Sticky section / sub-section bars (public flow) ----------
   In the authenticated flow `.v2-pq-body` is the scroll container, so the
   section bar's `top: 0` is relative to the body. Here the whole page
   scrolls (we override `.v2-pq-body` to `overflow: visible`), so sticky
   resolves against the window — without a `top` offset the bar would hide
   behind the 72px `.v2-pub-header`. Push it down by the header height; the
   sub-section bar sits 49px (section bar height) below that. */
.v2-pub-container .v2-pq-section-bar {
    top: 72px;
}
.v2-pub-container .v2-pq-subsection-bar {
    top: 121px; /* 72 (header) + 49 (section bar) */
}
@media (max-width: 768px) {
    .v2-pub-container .v2-pq-section-bar {
        top: 56px;
    }
    .v2-pub-container .v2-pq-subsection-bar {
        top: 105px; /* 56 (header) + 49 (section bar) */
    }
}

/* Bottom submit footer — full-page version (Figma node 1252-79742).
   Scrolls along with the form when content is long; pinned to the
   viewport bottom by `margin-top: auto` (declared above, in the body
   flex chain) only when the form is shorter than the viewport. */
.v2-pub-submit-footer.v2-pq-submit-footer {
    position: static;
    z-index: 50;
    background: #FFFFFF;
    border-top: 1px solid #EDEEF0;
    box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
    padding: 24px max(24px, calc((100% - 980px) / 2));
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    border-radius: 0;
}

/* intl-tel-input country dropdown — must float above the sticky public header
   (z-index 100), the error bar (99), and the questionnaire's sticky section
   headers (z-index up to ~10051 for some overlays). */
.iti {
    position: relative;
}
.iti--container,
.iti__country-list {
    z-index: 1050;
}
.iti.iti--allow-dropdown.iti--show-flags.iti--separate-dial-code .iti__country-list,
.iti .iti__country-list {
    z-index: 1050;
}

/* ---------- Captcha + Terms & Conditions block ---------- */
.v2-pub-tnc-block {
    background: #FFFFFF;
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 120px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.v2-pub-captcha-wrap {
    display: flex;
    justify-content: center;
}

.v2-pub-captcha-wrap .g-recaptcha {
    transform-origin: center top;
}

.v2-pub-tnc {
    width: 100%;
    text-align: center;
    margin-top: 0;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v2-pub-tnc.terms_n_conditions .v2-pub-tnc-error.error {
    display: none;
    color: #E04545;
    font-size: 12px;
    line-height: 16px;
    margin: 4px 0 0 0;
}

.v2-pub-tnc.terms_n_conditions.v2-pub-tnc-invalid .v2-pub-tnc-error.error {
    display: block;
}

.v2-pub-tnc-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
    background: #FFFFFF;
}

.v2-pub-tnc-check {
    margin: 2px 0 0 0;
    width: 16px;
    height: 16px;
    accent-color: #2541DD;
    border: 1px solid #C2C2C2;
    border-radius: 4px;
    cursor: pointer;
    flex: 0 0 auto;
}

.v2-pub-tnc-msg {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    color: #3D3D3D;
    text-align: left;
    cursor: pointer;
}

/* Restore rich-text formatting inside the T&C message — reset_new.css applies
   `font: inherit` to strong/em/b/i/u/p which wipes the editor output. The
   newer richText plugin emits one `<p>` per line; render them as stacked
   blocks (no margin) so they read like prod's `<b>...<br/></b>` lines. */
.v2-pub-tnc-msg strong,
.v2-pub-tnc-msg b { font-weight: bold; }
.v2-pub-tnc-msg em,
.v2-pub-tnc-msg i { font-style: italic; }
.v2-pub-tnc-msg u { text-decoration: underline; }
.v2-pub-tnc-msg p { display: block; margin: 0; }
.v2-pub-tnc-msg p:empty { min-height: 1em; }

.v2-pub-tnc-doclink {
    font-size: 16px;
    line-height: 20px;
    margin-bottom: 0;
}

.v2-pub-tnc-doclink a {
    font-family: 'Lato', sans-serif;
    color: #2541DD;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
}

.v2-pub-tnc-doclink a:hover {
    color: #1A33B8;
}

/* Submit disabled state — when captcha/terms gate is open */
.v2-pq-submit-bottom.v2-pub-submit-disabled,
.v2-pq-header-submit-btn.v2-pub-submit-disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Terms & Conditions document viewer modal (Figma 1288:84648) ---------- */
.v2-pub-tnc-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 18, 35, 0.55);
    overflow: auto;
}

.v2-pub-tnc-modal.v2-pub-tnc-modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: v2PubTncBackdropIn 0.18s ease-out;
}

.v2-pub-tnc-modal .modal-content.custom-tc-modal {
    background: #FFFFFF;
    border-radius: 12px;
    width: calc(100% - 32px);
    max-width: 780px;
    height: 86vh;
    max-height: 86vh;
    min-height: 480px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 55px -18px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.v2-pub-tnc-modal.v2-pub-tnc-modal-open .modal-content.custom-tc-modal {
    animation: v2PubTncModalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes v2PubTncBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes v2PubTncModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.v2-pub-tnc-modal .tc-modal-header {
    align-self: stretch;
    color: #4F66E4;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    padding: 0;
    margin: 0;
    border: none;
    text-align: center;
}

.v2-pub-tnc-modal .tc-modal-body {
    align-self: stretch;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overscroll-behavior: contain;
}

.v2-pub-tnc-modal #pdf_viewer {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 12px;
    color: #5C5C5C;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-align: justify;
    scrollbar-width: thin;
    scrollbar-color: #4F66E4 #F2F2F2;
}

.v2-pub-tnc-modal #pdf_viewer::-webkit-scrollbar {
    width: 7px;
}

.v2-pub-tnc-modal #pdf_viewer::-webkit-scrollbar-track {
    background: #F2F2F2;
    border-radius: 64px;
}

.v2-pub-tnc-modal #pdf_viewer::-webkit-scrollbar-thumb {
    background: #4F66E4;
    border-radius: 64px;
}

.v2-pub-tnc-modal #canvas_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.v2-pub-tnc-modal .pdf-page-canvas {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    animation: v2PubTncPageIn 0.25s ease-out;
}

@keyframes v2PubTncPageIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.v2-pub-tnc-skeleton {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 12px;
}

.v2-pub-tnc-skel-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        rgba(15, 18, 35, 0.06) 0%,
        rgba(15, 18, 35, 0.12) 50%,
        rgba(15, 18, 35, 0.06) 100%
    );
    background-size: 200% 100%;
    animation: v2PubTncShimmer 1.4s ease-in-out infinite;
}

.v2-pub-tnc-skel-line--title { height: 22px; width: 38%; margin-bottom: 6px; }
.v2-pub-tnc-skel-line--95 { width: 95%; }
.v2-pub-tnc-skel-line--90 { width: 90%; }
.v2-pub-tnc-skel-line--85 { width: 85%; }
.v2-pub-tnc-skel-line--80 { width: 80%; }
.v2-pub-tnc-skel-line--70 { width: 70%; }
.v2-pub-tnc-skel-line--60 { width: 60%; }

@keyframes v2PubTncShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.v2-pub-tnc-modal-actions {
    align-self: stretch;
    display: flex;
    justify-content: center;
    padding: 0;
    border: none;
    margin: 0;
}

.v2-pub-tnc-accept {
    background: #4F66E4;
    color: #FFFFFF;
    border: 1px solid #4F66E4;
    border-radius: 2px;
    width: 191px;
    height: auto;
    padding: 4px 12px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.v2-pub-tnc-accept:hover {
    background: #3D52C6;
    border-color: #3D52C6;
}

/* When the org requires viewing the full TnC content before continuing, the
   button is locked until the user scrolls to the bottom of #pdf_viewer.
   visibility:hidden (not display:none) preserves the action bar's height so
   the modal layout doesn't jump when the button is revealed. */
.v2-pub-tnc-accept.v2-pub-tnc-accept--locked {
    visibility: hidden;
}

body.v2-pub-tnc-modal-locked {
    overflow: hidden;
}

/* ---------- Unavailable / error page — Figma 1645:76384 ---------- */
.v2-pub-page.v2-pub-error-state {
    background: #FFFFFF;
}

.v2-pub-page.v2-pub-error-state .v2-pq-header-right,
.v2-pub-page.v2-pub-error-state #v2PqHeaderSubmit {
    display: none;
}

.v2-pub-error-page {
    display: flex;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    background: #FFFFFF;
    min-height: calc(100vh - 72px);
}

.v2-pub-error-text-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 96px 0;
    box-sizing: border-box;
}

.v2-pub-error-content {
    width: 640px;
    max-width: 100%;
    padding-left: 32px;
    padding-right: 64px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 48px;
}

.v2-pub-error-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.v2-pub-error-heading {
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: -0.6px;
    color: #1F1F1F;
    margin: 0;
    width: 544px;
    max-width: 100%;
}

.v2-pub-error-supporting {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    color: #7A7A7A;
    margin: 0;
    width: 480px;
    max-width: 100%;
}

.v2-pub-error-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #FFFFFF;
    border: 1px solid #C2C2C2;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #5C5C5C;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.v2-pub-error-back-btn:hover {
    background: #FAFAFA;
    border-color: #A3A3A3;
}

.v2-pub-error-back-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.v2-pub-error-illustration {
    flex: 0 0 720px;
    background: #F9F9F9;
    position: relative;
    align-self: stretch;
    align-content: center;
    text-align: center;
}

.v2-pub-error-link-off {
    position: absolute;
    left: 240px;
    top: 265px;
    width: 240px;
    height: 240px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .v2-pub-userinfo {
        padding: 12px 24px;
    }

    .v2-pub-tnc-block {
        padding: 24px 60px;
    }

    .v2-pub-error-page {
        flex-direction: column;
        min-height: auto;
    }

    .v2-pub-error-text-col {
        justify-content: center;
        padding: 60px 24px;
    }

    .v2-pub-error-content {
        width: 100%;
        max-width: 640px;
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto;
    }

    .v2-pub-error-illustration {
        flex: 0 0 auto;
        width: 100%;
        height: 360px;
    }

    .v2-pub-error-link-off {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .v2-pub-header {
        padding: 0 16px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
    }

    .v2-pub-userinfo {
        padding: 12px 16px;
    }

    .v2-pub-userinfo-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .v2-pub-field {
        width: 100%;
        flex: 0 0 auto;
    }

    .v2-pub-submit-footer.v2-pq-submit-footer {
        padding: 16px 16px;
    }

    .v2-pub-tnc-block {
        padding: 20px 16px;
    }

    .v2-pub-captcha-wrap .g-recaptcha {
        transform: scale(0.85);
    }

    .v2-pub-tnc-modal .modal-content.custom-tc-modal {
        width: calc(100% - 16px);
        height: 92vh;
        max-height: 92vh;
        min-height: 0;
        padding: 16px;
    }

    .v2-pub-tnc-accept {
        width: 100%;
        max-width: 240px;
    }

    .v2-pub-error-text-col {
        padding: 40px 16px;
    }

    .v2-pub-error-content {
        gap: 32px;
    }

    .v2-pub-error-heading {
        font-size: 24px;
        letter-spacing: -0.4px;
        width: 100%;
    }

    .v2-pub-error-supporting {
        font-size: 16px;
        line-height: 24px;
        width: 100%;
    }

    .v2-pub-error-illustration {
        height: 280px;
    }

    .v2-pub-error-link-off {
        width: 160px;
        height: 160px;
    }
}

/* ============================================================
   Success state (Figma 1288:84676)
   - Navy-blue full-bleed background under a sticky white header
   - Centered white card with Lottie confetti tick + thank-you copy
   ============================================================ */

.v2-pub-page.v2-pub-success-state {
    background: #123075;
}

/* Hide the Submit action on the success page, but keep the right column in the
   flex flow (visibility:hidden, not display:none) so the `--centered` header's
   `logo | center | right` balance survives — display:none drops the right
   column, letting the logo grow and shove the centred title to the right edge. */
.v2-pub-page.v2-pub-success-state .v2-pq-header-right {
    visibility: hidden;
}
.v2-pub-page.v2-pub-success-state #v2PqHeaderSubmit {
    display: none;
}

.v2-pub-success-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 176px 24px 48px;
    background: #123075;
}

.v2-pub-success-card {
    width: 480px;
    height: 360px;
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 36px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 72px;
}

.v2-pub-success-anim {
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -180px;
}

.v2-pub-success-anim svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Static fallback: nested green rings + check tick (matches Figma static spec) */
.v2-pub-success-anim--fallback {
    position: relative;
}

.v2-pub-success-anim--fallback::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #D1FADF;
    border: 23.33px solid #ECFDF3;
    box-sizing: border-box;
}

.v2-pub-success-anim--fallback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #12B76A;
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M5 12.5l4.5 4.5L19 7' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 36px 36px;
}

.v2-pub-success-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-top: -210px;
}

.v2-pub-success-title {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 28px;
    color: #3D3D3D;
}

.v2-pub-success-sub {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #7A7A7A;
}

/* Reference number shown after a successful public submission. Mirrors the
   authenticated flow's success screen (process_questionnaire_v2.css
   .v2-pq-success-ref) — centered label + value with top/bottom dividers. */
.v2-pub-success-ref {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid #E5E5EA;
    margin-top: 4px;
}

.v2-pub-success-ref-label {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #6B7280;
}

.v2-pub-success-ref-value {
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #1F1F1F;
}

/* Configurable per-evaluation thanks message (Evaluation.thanksText). Sits
   below the standard sub-line; newlines from the configured value are rendered
   as <br/> so multi-paragraph messages don't collapse into a single run. */
.v2-pub-success-thanks {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #5C5C5C;
    margin-top: 8px;
    max-width: 520px;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 768px) {
    .v2-pub-success-wrap {
        padding: 80px 16px 32px;
    }
    .v2-pub-success-card {
        padding: 28px 20px;
        gap: 48px;
    }
    .v2-pub-success-anim {
        width: 160px;
        height: 160px;
    }
}

/* ---------- MLRA Expected Due Date (Case 3 — L0 in MLRA + enableConfig + dueType in (1,3))
   Mirrors old UI public_create_dc.jsp:1648-1672 (mlra-assign-due-wrap) with V2 styling.
   The wrap sits between the last section and captcha/T&C, full-width white card with
   left-aligned label + 300px-wide date input on the right. Reuses .v2-pq-text-input
   styling so the cursor + calendar icon behave the same as in-question date pickers. */
.v2-pub-mlra-due-wrap {
    width: 100%;
    max-width: 880px;
    margin: 16px auto 0;
    box-sizing: border-box;
    background: #FFFFFF;
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.v2-pub-mlra-due-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #5C5C5C;
    line-height: 24px;
    margin: 0;
}

.v2-pub-mlra-due-input-wrap {
    flex: 0 0 300px;
    max-width: 300px;
    width: 300px;
}

.v2-pub-mlra-due-input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 42px;
    cursor: pointer;
}

.v2-pub-mlra-due-input.v2-pub-mlra-due-readonly {
    background: #F5F5F5;
    color: #7A7A7A;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .v2-pub-mlra-due-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .v2-pub-mlra-due-input-wrap {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }
}

/* ===== External-query per-question OTP (phone valType 9 / email valType 12) =====
   The user types a phone/email inline, validates via OTP, then the rest of the
   questions appear. Reuses .v2-pq-text-input / .v2-pq-phone-wrap visual language. */
.v2-extqry-otp-validated {
    background: #F9FAFB;
    color: #344054;
    cursor: default;
}
.v2-extqry-otp-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}
.v2-extqry-otp-validate-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    background: #4F66E4;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    padding: 10px 28px;
    border-radius: 8px;
}
.v2-extqry-otp-validate-btn:hover {
    background: #3F54C4;
}
.v2-extqry-otp-hint {
    margin: 16px auto 0;
    text-align: center;
    color: #667085;
    font-size: 13px;
    line-height: 18px;
}
