/*
 * TecCorp Quote Form 4 adapter.
 * Loaded only on /get-qoute/. Shared typography, controls and focus states are
 * owned by design-tokens.css and shared-components.css; this file owns only
 * Form 4 geometry and Fluent/Choices compatibility.
 */

.page-id-838 :is(.text.text-justify, .ff-el-input--label, .ff-el-input--content) {
    text-align: start;
}

.page-id-838 #fluentform_4 {
    margin-inline: auto;
    max-width: 100%;
}

.page-id-838 #fluentform_4 .ff-el-group {
    min-width: 0;
    margin-bottom: var(--tc-space-3);
}

.page-id-838 #fluentform_4 .ff-el-input--content {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

.page-id-838 #fluentform_4 .ff-t-container {
    gap: var(--tc-space-2);
}

.page-id-838 #fluentform_4 :is(
    .ff-el-form-control:not(.ff-screen-reader-element),
    select,
    textarea,
    input[type="text"],
    input[type="email"],
    input[type="tel"]
) {
    box-sizing: border-box;
    max-width: 100%;
    min-height: var(--tc-control-height-large);
    width: 100%;
}

/* Image-choice fields retain their Form 4 behavior without overriding the
   stored field configuration or Fluent Forms conditional logic. */
.page-id-838 #fluentform_4 .ff_el_checkable_photo_holders {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.page-id-838 #fluentform_4 .ff-el-form-check {
    align-items: center;
    background: var(--tc-color-paper);
    border: 1px solid var(--tc-color-line-strong);
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 8.125rem;
    padding: 0.75rem;
    position: relative;
    text-align: center;
    width: 100%;
}

.page-id-838 #fluentform_4 .ff-el-form-check label {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    min-height: auto;
    padding: 1rem 0.625rem;
    width: 100%;
}

.page-id-838 #fluentform_4 .ff-el-form-check-label {
    align-items: center;
    justify-content: center;
    min-height: auto;
    text-align: center;
}

.page-id-838 #fluentform_4 .ff-el-form-check-input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.page-id-838 #fluentform_4 .ff-el-form-check:focus-within {
    outline: var(--tc-focus-ring);
    outline-offset: 2px;
}

.page-id-838 #fluentform_4 .ff-el-image-input-src {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: block;
    height: 5.625rem;
    margin: 0 auto 0.5rem;
    max-height: 5.625rem;
    max-width: 8.125rem;
    width: 100%;
}

.page-id-838 #fluentform_4 .ff-el-form-check.ff_item_selected {
    background: var(--tc-color-surface);
    border-color: var(--tc-color-accent);
    box-shadow: inset 0 0 0 1px var(--tc-color-accent);
}

.page-id-838 #fluentform_4 .ff-el-form-check.ff_item_selected label > span {
    background: var(--tc-color-accent);
    border-color: var(--tc-color-accent);
    box-shadow: none;
    color: var(--tc-color-paper);
}

/* Choices.js is initialized by Fluent Forms; this adapter changes presentation
   only and leaves selection/removal behavior with the plugin. */
.page-id-838 #fluentform_4 .choices {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    max-width: 100%;
    padding: 0;
    position: relative;
    width: 100%;
}

.page-id-838 #fluentform_4 .choices__inner {
    align-items: center;
    background: var(--tc-color-paper);
    border: 1px solid var(--tc-color-line-strong);
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-height: var(--tc-control-height-large);
    padding: 0.5rem 0.625rem;
    width: 100%;
}

/* Choices.js writes width/min-width inline on its cloned search input. Keep
   that input part of the single outer control instead of rendering a nested
   browser-default field. */
.page-id-838 #fluentform_4 .choices input.choices__input--cloned {
    appearance: none;
    align-self: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--tc-color-ink);
    flex: 1 1 8rem;
    font: inherit;
    line-height: inherit;
    margin: 0;
    max-width: 100%;
    min-height: calc(var(--tc-control-height-large) - 1rem - 2px);
    min-width: 8rem !important;
    outline: 0;
    padding: 0;
    width: auto !important;
}

.page-id-838 #fluentform_4 .choices.is-focused .choices__inner,
.page-id-838 #fluentform_4 .choices.is-open .choices__inner {
    border-color: var(--tc-color-accent-dark);
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.16);
}

.page-id-838 #fluentform_4 .choices__list--dropdown {
    background: var(--tc-color-paper);
    border: 1px solid var(--tc-color-line-strong);
    display: none;
    inset: 100% 0 auto;
    max-height: 16.25rem;
    overflow-y: auto;
    position: absolute;
    z-index: 30;
}

.page-id-838 #fluentform_4 .choices.is-open .choices__list--dropdown {
    border-top: 0;
    display: block;
}

.page-id-838 #fluentform_4 .choices__list--dropdown .choices__item {
    cursor: pointer;
    font-size: var(--tc-type-button);
    padding: 0.5rem 0.75rem;
}

.page-id-838 #fluentform_4 .choices__list--dropdown :is(.choices__item:hover, .is-highlighted) {
    background: var(--tc-color-surface);
}

.page-id-838 #fluentform_4 .choices__list--multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.page-id-838 #fluentform_4 .choices__list--multiple .choices__item {
    align-items: center;
    background: var(--tc-color-surface);
    border: 1px solid var(--tc-color-accent);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-color-ink);
    display: inline-flex;
    font-size: var(--tc-type-label);
    gap: 0.375rem;
    line-height: 1.2;
    margin: 0;
    padding: 0.25rem 0.5rem;
}

.page-id-838 #fluentform_4 .choices__list--multiple .choices__button {
    background: none;
    border: 0;
    color: var(--tc-color-ink);
    font-size: 0;
    height: 1.125rem;
    margin: 0;
    min-height: 0;
    min-width: 1.125rem;
    opacity: 0.75;
    padding: 0;
    position: relative;
    width: 1.125rem;
}

.page-id-838 #fluentform_4 .choices__list--multiple .choices__button::before {
    color: var(--tc-color-ink);
    content: "×";
    font-size: 1.125rem;
    line-height: 1.125rem;
}

@media (max-width: 768px) {
    .page-id-838 #fluentform_4 .ff_el_checkable_photo_holders {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-id-838 #fluentform_4 .ff-t-container {
        display: block;
    }

    .page-id-838 #fluentform_4 .ff-t-cell {
        flex-basis: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-id-838 #fluentform_4 .ff_el_checkable_photo_holders {
        grid-template-columns: 1fr;
    }

    .page-id-838 #fluentform_4 .ff_list_3col > .ff-el-input--content {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .page-id-838 #fluentform_4 .ff_list_3col > .ff-el-input--content > .ff-el-form-check {
        align-items: flex-start;
        min-height: var(--tc-control-height);
        max-width: 100%;
        text-align: start;
    }

    .page-id-838 #fluentform_4 .ff_list_3col > .ff-el-input--content > .ff-el-form-check label {
        align-items: flex-start;
        padding: 0.7rem;
        text-align: start;
    }
}
