﻿/* ==========================================
   Blackpool Legacy Contensis Form Styling
   Aligned to the new .contensis-form look & feel
   ========================================== */

:root {
    --color-base-white: #FFF;
    --color-base-black: #000;
    --color-midnight-lightest: #8FAAC7;
    --color-midnight-lighter: #6583A4;
    --color-midnight-light: #31577D;
    --color-midnight-dark: #002033;
    --color-midnight-darker: #06151E;
    --color-dark-grey-lighter: #757575;
    --color-dark-grey-lightest: #595959;
    --color-dark-grey-light: #444444;
    --color-dark-grey-dark: #333333;
    --color-dark-grey-darker: #262626;
    --color-dark-grey-darkest: #1F1F1F;
    --color-light-grey-lighter: #FDFDFD;
    --color-light-grey-lightest: #FAFAFA;
    --color-light-grey-light: #F0F0F0;
    --color-light-grey-dark: #DBDBDB;
    --color-light-grey-darker: #CCCCCC;
    --color-light-grey-darkest: #949494;
    --color-blue-lightest: #F1F6FD;
    --color-blue-light: #1D5FC2;
    --color-blue-dark: #1D5C90;
    --color-blue-darker: #1B5483;
    --color-blue-darkest: #1B5483;
    --color-red-lightest: #F9D7D7;
    --color-red-dark: #CA2121;
    --color-red-darker: #B71A1A;
}

/* ==========================================
   Container
   ========================================== */

.bp-form-wrapper {
    /* Match .contensis-form */
    --semantic-btn-action-background: #FFDD00;
    --semantic-btn-action-border: #FFDD00;
    --semantic-btn-action-hover: #00304d;
    --semantic-btn-action-color: #333;
    --required: #D42D2D;
    --semantic-background-primary: #fff;
    --semantic-background-secondary: #f1f6fd;
    --semantic-input-background-primary: #fff;
    --semantic-type-primary: #333;
    --semantic-link-primary: #1853ac;

    padding: 0 1rem;
    margin: 0 auto;
    max-width: 48.25rem;
    width: 100%;
    color: var(--semantic-type-primary);
    font-size: 1.3rem;
    line-height: 1.4;
    box-sizing: border-box;
}

.bp-form-wrapper *,
.bp-form-wrapper *::before,
.bp-form-wrapper *::after {
    box-sizing: border-box;
    /* color: black; */
}

/* ==========================================
   Headings inside legacy form
   ========================================== */

.bp-form-wrapper h3 {
    font-size: 2.2rem !important;
    margin-bottom: 15px !important;
}

.bp-form-wrapper h4 {
    font-size: 2.0rem !important;
    margin-bottom: 15px !important;
}

/* ==========================================
   Reset WebForms table layout
   ========================================== */

.bp-form-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.bp-form-wrapper td {
    padding: 0;
    border: none;
}

/* ==========================================
   Form list / item layout
   ========================================== */

.bp-form-wrapper .sys_cms-form-body {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.bp-form-wrapper .sys_cms-form-item {
    width: 100%;
    max-width: 48.25rem;
}

.bp-form-wrapper .form-group,
.bp-form-wrapper tr {
    margin-bottom: 1.5rem;
    display: block;
}

/* ==========================================
   Labels / legends
   ========================================== */

.bp-form-wrapper label,
.bp-form-wrapper .sys_fieldlabel,
.bp-form-wrapper .sys_legend,
.bp-form-wrapper .sys_legend--simple,
.bp-form-wrapper .sys_sectionbreak-header {
    font-size: 1.3rem;
    line-height: 1.3rem;
    font-weight: 700 !important;
    margin: 0 0 15px 0;
    display: block;
    color: var(--semantic-type-primary);
}

/* Inline radio/checkbox labels shouldn't break onto their own line */
.bp-form-wrapper .sys_fieldset--simple label,
.bp-form-wrapper .sys_fieldset--simple .sys_legend {
    font-size: 1.3rem;
    line-height: 1.3rem;
    font-weight: 700 !important;
    display: inline-block;
    margin: 0 0 10px 10px;
}

/* Required asterisk */
.bp-form-wrapper .sys_required,
.bp-form-wrapper .required,
.bp-form-wrapper span[style*="red"] {
    color: var(--required);
    text-decoration: none;
    border-bottom: none;
    font-weight: 700;
}

/* ==========================================
   Fieldset
   ========================================== */

.bp-form-wrapper fieldset.sys_fieldset--simple {
    border: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

/* ==========================================
   Field content wrapper
   ========================================== */

.bp-form-wrapper .sys_fieldcontent {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* ==========================================
   Inputs / textareas / selects
   ========================================== */

.bp-form-wrapper input[type="text"],
.bp-form-wrapper input[type="email"],
.bp-form-wrapper input[type="tel"],
.bp-form-wrapper input[type="url"],
.bp-form-wrapper input[type="number"],
.bp-form-wrapper input[type="password"],
.bp-form-wrapper input[type="file"],
.bp-form-wrapper input[type="date"],
.bp-form-wrapper textarea,
.bp-form-wrapper select {
    padding: 0.5rem 0.5rem;
    height: 100%;
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid var(--semantic-type-primary);
    background: var(--semantic-input-background-primary);
    color: var(--semantic-type-primary);
    font-size: 1.3rem;
    line-height: 1.3rem;
    font-weight: 400;
    margin: 0;
    box-sizing: border-box;
}

.bp-form-wrapper textarea {
    border: 1px solid var(--semantic-type-primary) !important;
}

/* Remove the old sys_small / sys_medium / sys_large width rules */
.bp-form-wrapper input.sys_small,
.bp-form-wrapper input.sys_medium,
.bp-form-wrapper input.sys_large,
.bp-form-wrapper textarea.sys_small,
.bp-form-wrapper textarea.sys_medium,
.bp-form-wrapper textarea.sys_large,
.bp-form-wrapper select.sys_small,
.bp-form-wrapper select.sys_medium,
.bp-form-wrapper select.sys_large {
    width: 100%;
    max-width: 100%;
}

/* Focus state — matches the new form's blue focus */
.bp-form-wrapper input:focus,
.bp-form-wrapper textarea:focus,
.bp-form-wrapper select:focus {
    outline: none;
    border-color: var(--color-blue-dark);
    box-shadow: 0 0 0 3px rgba(29, 92, 144, 0.2);
}

/* Textarea */
.bp-form-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

/* ==========================================
   Radio / Checkbox
   ========================================== */

.bp-form-wrapper input[type="radio"],
.bp-form-wrapper input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--color-blue-dark);
}

.bp-form-wrapper .radio,
.bp-form-wrapper .checkbox {
    margin-bottom: 0.5rem;
}

/* The legacy checkbox list uses <span> wrappers */
.bp-form-wrapper .sys_fieldcontent > span {
    display: block;
    margin-bottom: 10px;
}

.bp-form-wrapper .sys_boxclearer {
    display: block;
    margin-bottom: 10px;
}

/* ==========================================
   Buttons (Next Page / Previous Page / Submit)
   ========================================== */

.bp-form-wrapper input[type="submit"],
.bp-form-wrapper button,
.bp-form-wrapper .sys_form-submit,
.bp-form-wrapper .btn {
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5rem;
    margin: 0 20px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 5px;
    cursor: pointer;
    padding: 0.8rem 0.8rem;
    transition: 200ms ease-in;
    background-color: var(--semantic-btn-action-background);
    border: 1px solid var(--semantic-btn-action-border);
    color: var(--semantic-btn-action-color);
}

.bp-form-wrapper input[type="submit"]:hover,
.bp-form-wrapper button:hover,
.bp-form-wrapper .sys_form-submit:hover,
.bp-form-wrapper .btn:hover {
    background-color: var(--semantic-btn-action-hover);
    color: #fff;
}

.bp-form-wrapper input[type="submit"]:active,
.bp-form-wrapper button:active {
    transform: translateY(1px);
}

/* ==========================================
   Section breaks (headings / paragraphs)
   ========================================== */

.bp-form-wrapper .sys_sectionbreak-header {
    font-size: 1.65rem;
    line-height: 1.65rem;
    margin: 1.5rem 0 0.5rem 0;
    font-family: Calibri, Arial;
}

.bp-form-wrapper .sys_sectionbreak-text {
    font-size: 1.2rem;
    line-height: 1.5rem;
    margin-bottom: 1rem;
}

/* ==========================================
   Page break indicator
   ========================================== */

.bp-form-wrapper .sys_pagebreak {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1rem;
}

.bp-form-wrapper .sys_pagebreak-indicator {
    font-size: 1.875rem;
    line-height: 1.5rem;
    font-weight: 400;
    margin: 0;
}

/* ==========================================
   Validation
   ========================================== */

.bp-form-wrapper .field-validation-error,
.bp-form-wrapper .validation-summary-errors,
.bp-form-wrapper span[style*="color:Red"],
.bp-form-wrapper div.form-field-error {
    color: var(--color-red-dark);
    font-size: 1.2rem;
    margin-top: 0.25rem;
    display: block;
}

.bp-form-wrapper .form-validation-summary-title {
    font-size: 1.8rem;
    color: #e20032;
    font-weight: bold;
}

.bp-form-wrapper ul.form-validation-summary-list {
    margin-bottom: 15px;
}

.bp-form-wrapper ul.form-validation-summary-list > li > a {
    font-size: 1.2rem;
    color: #e20032;
    text-decoration: none !important;
    margin-bottom: 5px;
    display: inline-block;
    font-weight: 600;
}

.bp-form-wrapper input.input-validation-error,
.bp-form-wrapper textarea.input-validation-error,
.bp-form-wrapper select.input-validation-error {
    border-color: var(--color-red-dark);
}

/* ==========================================
   Help text
   ========================================== */

.bp-form-wrapper .help-text,
.bp-form-wrapper small {
    font-size: 0.9rem;
    color: #505a5f;
    margin-top: 0.25rem;
    display: block;
}

/* ==========================================
   HR
   ========================================== */

.bp-form-wrapper hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #d8dde0;
}

/* ==========================================
   Date picker leftovers
   ========================================== */

input.hasDatepicker {
    width: 50% !important;
    height: 36px !important;
    max-width: 290px !important;
}

div.form-date-items {
    height: auto;
    display: table;
    width: 100%;
}

div.form-date-items > div.form-date-item {
    float: left;
    width: 65px;
}

div.form-date-items > div.form-date-item:last-child {
    float: left;
    width: 75px;
}

div.form-date-item > label {
    position: relative;
    left: 6px;
    top: -3px;
    font-size: 1.2rem;
}

div.form-date-items div.form-date-separator {
    width: 15px;
    float: left;
    font-size: 1.2rem;
    color: #fff;
}

div.form-date-items > div.form-date-item > input.form-date-day-input,
div.form-date-items > div.form-date-item > input.form-date-month-input {
    width: 60px;
    margin-left: 5px;
    font-size: 1.5rem;
}

div.form-date-items > div.form-date-item > input.form-date-year-input {
    width: 85px;
    margin-left: 5px;
    font-size: 1.5rem;
}

/* ==========================================
   Confirmation
   ========================================== */

.bp-form-wrapper div.form-confirmation-message {
    padding: 30px;
}

.bp-form-wrapper div.form-confirmation-message > p {
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
}

/* ==========================================
   Responsive
   ========================================== */

@media only screen and (min-width: 768px) {
    .bp-form-wrapper input[type="submit"],
    .bp-form-wrapper button,
    .bp-form-wrapper .btn {
        margin-left: auto;
    }

    .bp-form-wrapper .sys_pagebreak {
        justify-content: flex-end;
    }
}

@media only screen and (max-width: 768px) {
    .bp-form-wrapper .sys_pagebreak {
        width: 100%;
        justify-content: flex-end;
        align-items: center;
    }
}

@media only screen and (max-width: 640px) {
    .bp-form-wrapper {
        padding: 1rem;
    }

    .bp-form-wrapper input[type="submit"],
    .bp-form-wrapper button {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media only screen and (max-width: 480px) {
    .bp-form-wrapper h3 {
        font-size: 1.9rem !important;
        margin-bottom: 10px !important;
    }

    .bp-form-wrapper h4 {
        font-size: 1.7rem !important;
        margin-bottom: 10px !important;
    }

    .bp-form-wrapper label,
    .bp-form-wrapper .sys_fieldlabel,
    .bp-form-wrapper .sys_legend,
    .bp-form-wrapper .sys_sectionbreak-header {
        font-size: 1rem;
        line-height: 1rem;
    }

    .bp-form-wrapper input[type="text"],
    .bp-form-wrapper input[type="email"],
    .bp-form-wrapper input[type="tel"],
    .bp-form-wrapper input[type="url"],
    .bp-form-wrapper input[type="number"],
    .bp-form-wrapper textarea,
    .bp-form-wrapper select {
        font-size: 1rem;
        line-height: 1rem;
    }

    .bp-form-wrapper input[type="submit"],
    .bp-form-wrapper button,
    .bp-form-wrapper .btn {
        font-size: 1rem;
        line-height: 1rem;
    }

    div.form-date-item > label {
        font-size: 1rem;
    }

    div.form-date-items div.form-date-separator {
        font-size: 1rem;
    }

    div.form-date-items > div.form-date-item > input.form-date-day-input,
    div.form-date-items > div.form-date-item > input.form-date-month-input {
        font-size: 1rem;
    }

    div.form-date-items > div.form-date-item > input.form-date-year-input {
        font-size: 1rem;
    }

    .bp-form-wrapper .form-progress-label {
        font-size: 15px;
    }

    .bp-form-wrapper .form-validation-summary-title {
        font-size: 1.2rem;
        color: #e20032;
        font-weight: bold;
    }

    .bp-form-wrapper ul.form-validation-summary-list > li > a {
        font-size: 1rem;
    }

    .bp-form-wrapper div.form-field-error {
        font-size: 1rem;
        color: #e20032;
    }

    .bp-form-wrapper div.form-confirmation-message {
        padding: 30px;
    }

    .bp-form-wrapper div.form-confirmation-message > p {
        font-size: 1.1rem;
    }
}