/* =========================================================
   Formidable Forms – Intertronics
   ========================================================= */

/* ---------------------------------------------------------
   1. Wrapper
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style {
    /* Focus ring: dark brand orange, 4.95:1 on white and 4.5:1 on the page
       background (WCAG 1.4.11 needs 3:1). The lighter brand orange is only 2.77:1. */
    --itx-focus-colour: #b85200;

    font-size: inherit;
    line-height: inherit;
    color: var(--color-content-text, #333);
}

/* ---------------------------------------------------------
   2. Fields container & field spacing
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_fields_container {
    list-style: none;
    margin: 0;
    padding: 0;
}

.frm_style_formidable-style.with_frm_style .frm_form_field {
    margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------
   3. Labels
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_primary_label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-content-text, #333);
}

/* ---------------------------------------------------------
   4. Required mark
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_required {
    color: var(--color-content-primary, #e95095);
    margin-left: 0.15em;
}

/* ---------------------------------------------------------
   5. Text inputs, textarea, select
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style input[type="text"],
.frm_style_formidable-style.with_frm_style input[type="email"],
.frm_style_formidable-style.with_frm_style input[type="tel"],
.frm_style_formidable-style.with_frm_style input[type="url"],
.frm_style_formidable-style.with_frm_style input[type="number"],
.frm_style_formidable-style.with_frm_style input[type="password"],
.frm_style_formidable-style.with_frm_style input[type="date"],
.frm_style_formidable-style.with_frm_style input[type="datetime-local"],
.frm_style_formidable-style.with_frm_style input[type="time"],
.frm_style_formidable-style.with_frm_style input[type="week"],
.frm_style_formidable-style.with_frm_style input[type="month"],
.frm_style_formidable-style.with_frm_style input[type="search"],
.frm_style_formidable-style.with_frm_style textarea,
.frm_style_formidable-style.with_frm_style select {
    display: block;
    width: 100%;
    padding: 0.65em 0.8em;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-content-text, #333);
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 0 !important;
    box-shadow: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* ---------------------------------------------------------
   6. Focus state
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style input[type="text"]:focus,
.frm_style_formidable-style.with_frm_style input[type="email"]:focus,
.frm_style_formidable-style.with_frm_style input[type="tel"]:focus,
.frm_style_formidable-style.with_frm_style input[type="url"]:focus,
.frm_style_formidable-style.with_frm_style input[type="number"]:focus,
.frm_style_formidable-style.with_frm_style input[type="password"]:focus,
.frm_style_formidable-style.with_frm_style input[type="date"]:focus,
.frm_style_formidable-style.with_frm_style input[type="datetime-local"]:focus,
.frm_style_formidable-style.with_frm_style input[type="time"]:focus,
.frm_style_formidable-style.with_frm_style input[type="week"]:focus,
.frm_style_formidable-style.with_frm_style input[type="month"]:focus,
.frm_style_formidable-style.with_frm_style input[type="search"]:focus,
.frm_style_formidable-style.with_frm_style textarea:focus,
.frm_style_formidable-style.with_frm_style select:focus {
    outline: 2px solid var(--itx-focus-colour);
    outline-offset: 2px;
    border-color: var(--color-content-primary, #e95095);
    box-shadow: none; /* stops Formidable's own focus glow */
}

/* ---------------------------------------------------------
   7. Textarea
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style textarea {
    min-height: 9rem;
    resize: vertical;
}

/* ---------------------------------------------------------
   8. Select — restore native arrow, remove default appearance
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    padding-right: 2.4em;
    cursor: pointer;
}

.frm_style_formidable-style.with_frm_style select[multiple] {
    background-image: none;
    padding-right: 0.8em;
    height: auto;
}

/* ---------------------------------------------------------
   9. Placeholder
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style input::placeholder,
.frm_style_formidable-style.with_frm_style textarea::placeholder {
    font-size: 1rem;
    color: #aaa;
    opacity: 1;
}

/* ---------------------------------------------------------
   10. Checkboxes & radios
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_checkbox,
.frm_style_formidable-style.with_frm_style .frm_radio {
    list-style: none;
    margin: 0;
    padding: 0;
}

.frm_style_formidable-style.with_frm_style .frm_checkbox li,
.frm_style_formidable-style.with_frm_style .frm_radio li {
    margin-bottom: 0.35rem;
}

.frm_style_formidable-style.with_frm_style .frm_checkbox label,
.frm_style_formidable-style.with_frm_style .frm_radio label {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5em;
    font-weight: 400;
    cursor: pointer;
}

.frm_style_formidable-style.with_frm_style input[type="checkbox"],
.frm_style_formidable-style.with_frm_style input[type="radio"] {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 0 !important;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    top: 0.1em;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.frm_style_formidable-style.with_frm_style input[type="radio"] {
    border-radius: 50% !important;
}

.frm_style_formidable-style.with_frm_style input[type="checkbox"]:checked,
.frm_style_formidable-style.with_frm_style input[type="radio"]:checked {
    background-color: var(--color-content-primary, #e95095);
    border-color: var(--color-content-primary, #e95095);
}

.frm_style_formidable-style.with_frm_style input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
    width: 0.3em;
    height: 0.55em;
    border: 0.12em solid #fff;
    border-top: none;
    border-left: none;
}

.frm_style_formidable-style.with_frm_style input[type="radio"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.4em;
    height: 0.4em;
    border-radius: 50%;
    background: #fff;
}

/* Ring for keyboard focus only, not after a mouse click. */
.frm_style_formidable-style.with_frm_style input[type="checkbox"]:focus,
.frm_style_formidable-style.with_frm_style input[type="radio"]:focus {
    outline: none;
    border-color: var(--color-content-primary, #e95095);
    box-shadow: none;
}

.frm_style_formidable-style.with_frm_style input[type="checkbox"]:focus-visible,
.frm_style_formidable-style.with_frm_style input[type="radio"]:focus-visible {
    outline: 2px solid var(--itx-focus-colour);
    outline-offset: 2px;
    border-color: var(--color-content-primary, #e95095);
}

/* ---------------------------------------------------------
   11. File upload
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style input[type="file"] {
    display: block;
    width: 100%;
    font-size: 1rem;
    color: var(--color-content-text, #333);
    cursor: pointer;
}

.frm_style_formidable-style.with_frm_style .frm_dropzone {
    border: 2px dashed #ccc !important;
    border-radius: 0 !important;
    background: #fafafa !important;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.frm_style_formidable-style.with_frm_style .frm_dropzone:hover,
.frm_style_formidable-style.with_frm_style .frm_dropzone.frm_dragging {
    border-color: var(--color-content-primary, #e95095) !important;
}

/* ---------------------------------------------------------
   12. Field description / help text
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style p.description,
.frm_style_formidable-style.with_frm_style div.description,
.frm_style_formidable-style.with_frm_style div.frm_description,
.frm_style_formidable-style.with_frm_style .frm-show-form > div.frm_description,
.frm_style_formidable-style.with_frm_style .frm_error,
.frm_style_formidable-style.with_frm_style .frm_pro_max_limit_desc {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}

.frm_style_formidable-style.with_frm_style p.description,
.frm_style_formidable-style.with_frm_style div.description,
.frm_style_formidable-style.with_frm_style div.frm_description,
.frm_style_formidable-style.with_frm_style .frm-show-form > div.frm_description,
.frm_style_formidable-style.with_frm_style .frm_pro_max_limit_desc {
    margin: 0.3rem 0 0;
    color: #888;
}

/* ---------------------------------------------------------
   13. Validation errors
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_error {
    display: block;
    margin-top: 0.35rem;
    color: #c0392b;
}

.frm_style_formidable-style.with_frm_style .frm_error_style {
    border-radius: 0 !important;
    background: #fff5f5;
    border: 1px solid #c0392b;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: #c0392b;
}

.frm_style_formidable-style.with_frm_style .frm_blank_field input,
.frm_style_formidable-style.with_frm_style .frm_blank_field textarea,
.frm_style_formidable-style.with_frm_style .frm_blank_field select {
    border-color: #c0392b !important;
}

/* ---------------------------------------------------------
   14. Form-level success / error messages
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_message {
    border-radius: 0 !important;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.frm_style_formidable-style.with_frm_style .frm_message.frm_success_style,
.frm_message.frm_success_style {
    background: #f0faf4;
    border: 1px solid #2ecc71;
    border-radius: 0 !important;
    color: #1a7a3e;
}

.frm_style_formidable-style.with_frm_style .frm_message.frm_error_style,
.frm_message.frm_error_style {
    background: #fff5f5;
    border: 1px solid #c0392b;
    border-radius: 0 !important;
    color: #c0392b;
}

/* ---------------------------------------------------------
   15. Submit area & button
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_submit {
    margin-top: 0.5rem;
}

.frm_style_formidable-style.with_frm_style .frm_submit button,
.frm_style_formidable-style.with_frm_style .frm_submit input[type="submit"] {
    display: inline-block !important;
    font-family: inherit !important;
    font-style: normal !important;
    text-transform: none !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: 0em !important;
    padding: 1.0em 2.0em !important;
    border-radius: 100px !important;
    transition-property: background, border-color, color, box-shadow;
    transition-duration: 0.3s !important;
    transition-timing-function: ease !important;
    --btn-background: var(--color-brand-contact, #e95095);
    --btn-hover-background: var(--color-content-secondary, #7049ba);
    background: var(--btn-background) !important;
    border: 0 !important;
    border-image: none !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.frm_style_formidable-style.with_frm_style .frm_submit button:hover,
.frm_style_formidable-style.with_frm_style .frm_submit input[type="submit"]:hover {
    background: var(--btn-hover-background) !important;
    color: #fff !important;
}

.frm_style_formidable-style.with_frm_style .frm_submit button:focus-visible,
.frm_style_formidable-style.with_frm_style .frm_submit input[type="submit"]:focus-visible {
    outline: 2px solid var(--btn-background);
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   16. Multi-page: Next / Back buttons
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_prev_page {
    display: inline-block;
    font-family: inherit;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.2 !important;
    font-weight: 700;
    letter-spacing: 0em;
    padding: 1.0em 2.0em;
    border-radius: 100px !important;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    background: transparent;
    border: 1px solid #ccc;
    color: var(--color-content-text, #333) !important;
    cursor: pointer;
    margin-right: 0.75rem;
}

.frm_style_formidable-style.with_frm_style .frm_prev_page:hover {
    border-color: var(--color-content-primary, #e95095);
    color: var(--color-content-primary, #e95095) !important;
}

/* Progress bar */
.frm_style_formidable-style.with_frm_style .frm_progress_line {
    height: 4px;
    background: #eee;
    border-radius: 0 !important;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.frm_style_formidable-style.with_frm_style .frm_progress_line > * {
    height: 100%;
    background: var(--color-content-primary, #e95095);
    border-radius: 0 !important;
    transition: width 0.4s ease;
}

/* Page labels */
.frm_style_formidable-style.with_frm_style .frm_page_container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.frm_style_formidable-style.with_frm_style .frm_page_container > * {
    flex: 1 1 auto;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    background: #eee;
    border-radius: 0 !important;
}

.frm_style_formidable-style.with_frm_style .frm_page_container .frm_current_page {
    background: var(--color-content-primary, #e95095);
    color: #fff;
}

/* ---------------------------------------------------------
   17. Section heading / divider fields
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_section_heading {
    border-bottom: 1px solid #eee;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
}

.frm_style_formidable-style.with_frm_style .frm_section_heading h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.frm_style_formidable-style.with_frm_style .frm_section_heading p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #888;
}

/* ---------------------------------------------------------
   18. Repeater rows
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_repeat_sec {
    border: 1px solid #eee;
    border-radius: 0 !important;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.frm_style_formidable-style.with_frm_style .frm_add_form_row,
.frm_style_formidable-style.with_frm_style .frm_remove_form_row {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    color: var(--color-content-primary, #e95095);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.frm_style_formidable-style.with_frm_style .frm_remove_form_row {
    color: #888;
}

/* ---------------------------------------------------------
   19. Honeypot (hidden spam trap — keep invisible)
   --------------------------------------------------------- */

.frm_style_formidable-style.with_frm_style .frm_verify {
    display: none !important;
}
