﻿/* Base Styles */
html, body {
    margin: 0px;
    height: 100% !important;
    min-height: 100% !important;
   
}

body {
    line-height: 1.5;
    word-spacing: 0.16em;
    letter-spacing: 0.12em;
    background-color: #ffffff;
}

/* Standalone (Not Embedded) Specific Styles */
.is-standalone html,
.is-standalone body {
    background-color: #ffffff !important;
}

.is-standalone main {
    max-width: 700px !important;
}

.is-standalone .container {
    top: 45px;
}

.is-standalone .headerTitle {
    max-width: 700px !important;
    margin-bottom: 10px;
    position: relative;
    top: 0px;
}

input[type="radio"] {
    min-height: 44px !important;
    min-width: 44px !important;
}

h2, h3, h4 {
    color: #086200 !important;
    margin-bottom: 30px;
}

/* Embedded Specific Styles */
.is-embedded html,
.is-embedded body,
.is-embedded main {
    background-color: #f2f2f2 !important;
}

.is-embedded main {
    margin: unset !important;
    width: 100% !important;
}

.is-embedded .container {
    margin: unset !important;
    max-width: 100% !important;
}

.is-embedded .headerTitle {
    width: 100% !important;
    top: 0px;
    margin: unset !important;
}

/* General Layout & Accessibility Elements */
header {
    z-index: unset !important;
}

main {
    background-color: #f2f2f2 !important;
}
main.container {
    padding-top: 0px !important;
}

p {
    margin-bottom: 1.5em;
}

.error {
    color: #B30000;
}

.form-group{
    margin-bottom: 30px !important;
}

a {
    color: #00458f !important;
    text-decoration: underline !important;
}

button, .btn, input.form-control, select.form-control, textarea.form-control {
    min-height: 50px;
}

.bg-hillsboro-secondary {
    background-color: #086200 !important;
}


label {
    display: inline;
}

select.form-control {
    appearance: auto !important;
}

.btn,
.close,
input[type="submit"] {
    min-height: 50px;
    min-width: 150px;
}
/* Add padding to inline links so they are easier to tap on mobile */
a {
    padding: 0.25rem;
}


.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn:focus-visible {
    outline: 3px solid #0056b3; /* High contrast color */
    outline-offset: 2px;
}

legend {
    font-weight: bold !important;
    font-size: unset !important;
}

/* Hidden utilities */
.hidden, .successMessage, .failureMessage, .section,
#PREVBUTTON, #NEXTBUTTON, #btnSub {
    display: none;
}

.removedElement {
    display: none;
}

.error {
    color: #B30000;
    font-weight: bold;
}

/* Skip Link Accessibility */
.skip {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    outline: 3px solid #00458f !important;
    outline-offset: 2px;
}

    .skip:focus {
        position: static;
        width: auto;
        height: auto;
        background-color: #ffffff;
        color: #003082;
        padding: 10px;
        outline: 3px solid #003082;
        z-index: 99999;
        text-decoration: underline;
    }

/* Form Builder Overrides */
.formbuilder-radioRemoverElement-label,
.formbuilder-required {
    display: inline-block;
    vertical-align: middle;
}

.formbuilder-required {
    margin-left: 3px;
}

.radio-remover-wrapper{
    margin-top: 40px;
}

.radio {
    display: flex; 
    align-items: center; 
    gap: 8px;
    margin-bottom: 10px;
}

.formbuilder-contactFormSection-label {
    font-size: 24px;
}

.formbuilder-form-label,
.formbuilder-file-label,
.formbuilder-number-label,
.formbuilder-text-label,
.formbuilder-select-label,
.formbuilder-group-label,
.formbuilder-checkbox-group-label,
.formbuilder-date-label,
.formbuilder-textarea-label,
.form-label {
    font-weight: bold !important;
}

.form-label {
    margin-top: 1rem;
}

label {
   /* font-weight: bold !important;*/
    font-size: 1.0rem;
}

div.radio-group label {
    font-weight: unset !important;
}

/* Header Formatting */
.headerTitle {
    font-size: 36px;
    display: block;
    background-color: #003082;
    color: #ffffff;
    position: relative;
    text-align: center;
    vertical-align: middle;
    margin-top: -20px;
}

.container {
    padding-right: 0px !important;
    padding-left: 0px !important;
}


/* Review Section */
.review-item {
    margin-bottom: 1.5rem;
}

.review-label {
    font-weight: bold;
    color: #003082;
    font-size: 1.1em;
}

.review-value {
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
    word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}











/* Progress Indicator Container */
#form-progress-indicator {
    font-family: inherit;
    border-bottom: 6px solid #003082;
    background-color: #003082;
    color: #fff;
    position: relative;
    top: -40px;
    padding-top: 30px;
}

.progress-nav {
    display: block;
    width: 100%;

    /* Enables horizontal scrolling for 10-12 steps */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    /* Custom scrollbar styling for better aesthetics */
    scrollbar-width: thin;

}

    .progress-nav::-webkit-scrollbar {
        height: 6px;
    }

    .progress-nav::-webkit-scrollbar-track {
        background: #E0E0E0;
        border-radius: 4px;
    }

    .progress-nav::-webkit-scrollbar-thumb {
        background-color: #003082;
        border-radius: 4px;
    }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mobile-progress-text {
    display: none;
    text-align: center;
    font-weight: 700;
    color: #003082;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* Stepper Layout */
.stepper-list {
    display: flex;
    justify-content: flex-start; /* Keeps it left-aligned when scrolling */
    align-items: flex-start;
    list-style: none;
    padding: 0 10px 20px; /* Slight padding to prevent edge clipping of outlines */
    margin: 0;
    min-width: 200px; /* Forces items to stay inline, allowing the parent to scroll */
}

/* Individual Step Container */
.stepper-item {
    position: relative;
    min-width: 150px; /* Ensures circles and text don't crush together on 12-page forms */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-right: 10px;
}

    /* Gray Connector Line */
    .stepper-item::after {
        content: '';
        position: absolute;
        top: 22px; /* Center with the 44px circle */
        left: 50%;
        width: 100%;
        height: 4px;
        background: #CCCCCC;
        z-index: 1;
    }

    /* Blue Connector Line for completed steps */
    .stepper-item.completed::after {
        background: #4fa800;
    }

    /* Remove line from the very last step */
    .stepper-item:last-child::after {
        display: none;
    }

/* Clickable Button Wrapper for Completed Steps */
.step-button, .step-static {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: default;
    padding: 0;
    position: relative;
    z-index: 2; /* Sits above the lines */
}

.step-button {
    cursor: pointer;
}

    /* WCAG 2.2 AAA Focus Indicator (Highly Visible) */
    .step-button:focus-visible {
        outline: 3px solid #003082;
        outline-offset: 4px;
        border-radius: 4px;
    }

/* Circle UI (Increased to 40x40 to satisfy AAA target sizing constraints) */
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #4D4D4D; /* 7.1:1 Contrast against white */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #4D4D4D;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

/* Hover effect on clickable steps */
.step-button:hover .step-circle {
    background: #E6EEF8; /* Light blue tint */
    border-color: #003082;
    color: #003082;
}

/* Completed Step Styling */
.stepper-item.completed .step-circle {
    background: #4fa800;
    border-color: #003082;
    color: #FFFFFF;
}

/* Current Step Styling */
.stepper-item.current .step-circle {
    border-color: #4fa800;
    border-width: 4px;
    color: #003082;
    background: #FFFFFF;
    box-shadow: 0 0 0 5px rgba(0, 48, 130, 0.15); /* Soft focus ring */
}

/* Labels */
.step-label {
    font-size: 0.875rem;
    color: #ffffff; /* 12.6:1 Contrast (Passes AAA) */
    font-weight: 700;
    word-break: break-word;
    padding: 0 8px;
    line-height: 1.3;
}

/* Responsive Rules for Mobile */
@media (max-width: 768px) {
    .mobile-progress-text {
        display: block; /* Show bold "Step X of Y" on mobile */
    }
    /* We don't hide labels anymore, because users can scroll to read them! */
    .stepper-item {
        min-width: 100px; /* Compress slightly for mobile screens */
    }
}