.fhms-quote-form,
.fhms-quote-form * {
    box-sizing: border-box;
}

.fhms-quote-form {
    width: 100%;
    max-width: 100%;
    background: transparent;
}

.fhms-form-title {
    margin: 0 0 22px;
    line-height: 1.2;
}

.fhms-form-fields {
    display: grid;
    gap: 16px;
    width: 100%;
}

/* Template 1: every field one under another. */
.fhms-template-1 .fhms-form-fields {
    grid-template-columns: minmax(0, 1fr);
}

.fhms-template-1 .fhms-half,
.fhms-template-1 .fhms-full {
    grid-column: 1 / -1;
}

/* Template 2: exact FHMS two-column layout. */
.fhms-template-2 .fhms-form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fhms-template-2 .fhms-half {
    grid-column: span 1;
}

.fhms-template-2 .fhms-full {
    grid-column: 1 / -1;
}

.fhms-field,
.fhms-full,
.fhms-half,
.fhms-submit-wrap,
.fhms-consent {
    min-width: 0;
    width: 100%;
}

.fhms-field-label {
    display: block;
    margin: 0 0 7px;
    line-height: 1.35;
}

.fhms-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    padding: 11px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 0;
    outline: 0;
    background: #fff;
    color: #222;
    font: inherit;
    line-height: 1.4;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

select.fhms-input {
    appearance: auto;
    cursor: pointer;
}

textarea.fhms-input,
.fhms-textarea {
    min-height: 112px;
    resize: vertical;
}

.fhms-input:focus {
    border-color: #b08345;
    box-shadow: 0 0 0 1px rgba(176, 131, 69, .18);
}

.fhms-consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.fhms-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.fhms-consent-text {
    font-size: 13px;
    line-height: 1.45;
}

.fhms-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 0;
    border-radius: 0;
    background: #b08345;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.fhms-submit:hover,
.fhms-submit:focus {
    background: #00274d;
    color: #fff;
}

.fhms-submit:active {
    transform: translateY(1px);
}

.fhms-form-message {
    width: 100%;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, .92);
    font-size: 14px;
    line-height: 1.4;
}

.fhms-success {
    color: #176c37;
}

.fhms-error {
    color: #a32020;
}

.fhms-honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .fhms-template-1 .fhms-form-fields,
    .fhms-template-2 .fhms-form-fields {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .fhms-template-1 .fhms-half,
    .fhms-template-1 .fhms-full,
    .fhms-template-2 .fhms-half,
    .fhms-template-2 .fhms-full {
        grid-column: 1 / -1 !important;
    }

    .fhms-input,
    .fhms-submit {
        width: 100%;
    }
}

/* v1.1.1 - mobile form-control normalization for iOS Safari / Samsung Internet / Chrome Android */
.fhms-quote-form input.fhms-input,
.fhms-quote-form select.fhms-input,
.fhms-quote-form textarea.fhms-input {
    box-sizing: border-box !important;
    inline-size: 100% !important;
    width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    max-inline-size: 100% !important;
    max-width: 100% !important;
}

/* Native date controls can keep an intrinsic minimum width on iPhone/iPad Safari. */
.fhms-quote-form input.fhms-input[type="date"] {
    display: block !important;
    -webkit-appearance: none;
    appearance: none;
    inline-size: 100% !important;
    width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

.fhms-quote-form input.fhms-input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.fhms-quote-form input.fhms-input[type="date"]::-webkit-calendar-picker-indicator {
    flex: 0 0 auto;
    margin: 0;
}

@media (max-width: 767px) {
    .fhms-quote-form,
    .fhms-form-fields,
    .fhms-field,
    .fhms-half,
    .fhms-full,
    .fhms-submit-wrap,
    .fhms-consent {
        min-inline-size: 0 !important;
        min-width: 0 !important;
        max-inline-size: 100% !important;
        max-width: 100% !important;
    }

    .fhms-template-1 .fhms-form-fields,
    .fhms-template-2 .fhms-form-fields {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .fhms-template-1 .fhms-half,
    .fhms-template-1 .fhms-full,
    .fhms-template-2 .fhms-half,
    .fhms-template-2 .fhms-full {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 16px prevents Safari from zooming the page when a field receives focus. */
    .fhms-quote-form input.fhms-input,
    .fhms-quote-form select.fhms-input,
    .fhms-quote-form textarea.fhms-input {
        font-size: 16px !important;
    }

    .fhms-quote-form input.fhms-input[type="date"] {
        height: auto;
        min-height: 52px;
        padding-left: 14px;
        padding-right: 14px;
    }
}
