/* ==========================================================================
   Fitted furniture calculator (móveis planejados)
   Palette follows the site tokens: #19212D headings, #474D57 body,
   #6C7179 muted, #ECEDEF borders, #1AA6B7 accent.
   ========================================================================== */

.ff-sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.ff-form [hidden] {
    display: none !important;
}

.ff-form fieldset {
    border: 0;
    padding: 0;
}

/* --------------------------------------------------------------- typography */

.ff-block {
    margin: 0 0 8px;
}

.ff-block > legend {
    color: #19212D;
    float: none;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
    width: auto;
}

.ff-block-help {
    color: #6C7179;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ------------------------------------------------------------- room selection cards */

.ff-rooms {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-bottom: 8px;
}

@media (min-width: 576px) {
    .ff-rooms {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ff-room-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #DADBDD;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.ff-room-card:hover {
    border-color: #1AA6B7;
}

.ff-room-card input {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

.ff-room-card-check {
    background: #fff;
    border: 1.5px solid #C8CACD;
    border-radius: 6px;
    flex: 0 0 auto;
    height: 22px;
    margin-top: 1px;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
    width: 22px;
}

.ff-room-card-check::after {
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    height: 5px;
    left: 5px;
    opacity: 0;
    position: absolute;
    top: 6px;
    transform: rotate(-45deg);
    transition: opacity .15s ease;
    width: 10px;
}

.ff-room-card input:checked ~ .ff-room-card-check {
    background: #1AA6B7;
    border-color: #1AA6B7;
}

.ff-room-card input:checked ~ .ff-room-card-check::after {
    opacity: 1;
}

.ff-room-card input:checked ~ .ff-room-card-text .ff-room-card-title {
    color: #19212D;
}

.ff-room-card:has(input:checked) {
    background: #F4FBFC;
    border-color: #1AA6B7;
    box-shadow: inset 0 0 0 1px #1AA6B7;
}

.ff-room-card.is-selected {
    background: #F4FBFC;
    border-color: #1AA6B7;
    box-shadow: inset 0 0 0 1px #1AA6B7;
}

.ff-room-card input:focus-visible ~ .ff-room-card-check {
    box-shadow: 0 0 0 3px rgba(26, 166, 183, .3);
}

.ff-room-card-text {
    display: block;
}

.ff-room-card-title {
    color: #19212D;
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.ff-room-card-desc {
    color: #6C7179;
    display: block;
    font-size: 12.5px;
    line-height: 1.45;
    margin-top: 3px;
}

/* ------------------------------------------------------------- room counters */

.ff-counters {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

@media (min-width: 576px) {
    .ff-counters:not(:empty) {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ff-counter-label {
    color: #19212D;
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ff-steps {
    display: flex;
    gap: 8px;
}

.ff-step {
    flex: 1 1 0;
    margin: 0;
    min-width: 0;
}

.ff-step input {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

.ff-step-box {
    align-items: center;
    background: #fff;
    border: 1.5px solid #DADBDD;
    border-radius: 10px;
    color: #474D57;
    cursor: pointer;
    display: flex;
    font-size: 16px;
    font-weight: 600;
    height: 48px;
    justify-content: center;
    transition: all .15s ease;
}

.ff-step-box:hover {
    border-color: #1AA6B7;
    color: #1AA6B7;
}

.ff-step input:checked + .ff-step-box {
    background: #1AA6B7;
    border-color: #1AA6B7;
    color: #fff;
}

.ff-step input:focus-visible + .ff-step-box {
    box-shadow: 0 0 0 3px rgba(26, 166, 183, .3);
}

/* ----------------------------------------------------------------- room block */

/* Legacy room-block separator; panels now own their own spacing. */
.ff-form .ff-room {
    margin: 0;
}

.ff-room-title {
    color: #19212D;
    float: none;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-left: 12px;
    position: relative;
    width: auto;
}

.ff-room-title::before {
    background: #1AA6B7;
    border-radius: 2px;
    bottom: 3px;
    content: "";
    left: 0;
    position: absolute;
    top: 3px;
    width: 4px;
}

.ff-note {
    background: #F8F8F9;
    border-radius: 10px;
    margin-bottom: 26px;
    padding: 14px 16px;
}

.ff-note-title {
    color: #19212D;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    margin: 0 0 6px;
}

.ff-note-list {
    color: #6C7179;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    padding-left: 18px;
}

/* --------------------------------------------------------------- the matrix */

.ff-question {
    margin-bottom: 30px;
}

.ff-question-label {
    color: #19212D;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.ff-matrix-scroll {
    border: 1px solid #ECEDEF;
    border-radius: 12px;
    overflow: hidden;
}

.ff-matrix thead .ff-matrix-corner {
    border-top-left-radius: 11px;
}

.ff-matrix thead th:last-child {
    border-top-right-radius: 11px;
}

.ff-matrix {
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

/* Option column headers: thumbnail + name + size */
.ff-matrix-head {
    background: #F8F8F9;
    border-bottom: 1px solid #ECEDEF;
    border-left: 1px solid #ECEDEF;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    width: 50%;
}

.ff-matrix-corner {
    background: #F8F8F9;
    border-bottom: 1px solid #ECEDEF;
    width: 116px;
}

.ff-opt {
    align-items: center;
    display: flex;
    gap: 10px;
}

.ff-opt-thumb {
    background: #fff;
    border: 1px solid #E4E5E7;
    border-radius: 6px;
    color: #19212D;
    flex: 0 0 auto;
    height: 40px;
    line-height: 0;
    overflow: hidden;
    width: 52px;
}

.ff-photo {
    box-sizing: border-box;
    display: block;
    height: 100%;
    width: 100%;
}

/* Product shots vary in aspect ratio, so they fill the thumbnail. */
.ff-opt-thumb .ff-photo {
    object-fit: cover;
}

.ff-opt-text {
    flex: 1 1 auto;
    min-width: 0;
}

.ff-opt-name {
    color: #19212D;
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
}

.ff-opt-size {
    color: #12808D;
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1px;
}

.ff-matrix-row-label {
    color: #19212D;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.ff-matrix tbody tr + tr th,
.ff-matrix tbody tr + tr td {
    border-top: 1px solid #ECEDEF;
}

.ff-matrix td {
    border-left: 1px solid #ECEDEF;
    padding: 0;
    vertical-align: middle;
}

.ff-matrix-cell {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0;
    min-height: 56px;
    padding: 10px 12px;
    transition: background .15s ease;
    width: 100%;
}

.ff-matrix-cell:hover {
    background: #F4FBFC;
}

.ff-matrix-input {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

/* Custom radio mark */
.ff-mark {
    background: #fff;
    border: 1.5px solid #C8CACD;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 22px;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
    width: 22px;
}

.ff-mark::after {
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    height: 5px;
    left: 5px;
    opacity: 0;
    position: absolute;
    top: 6px;
    transform: rotate(-45deg);
    transition: opacity .15s ease;
    width: 10px;
}

.ff-matrix-input:checked ~ .ff-mark {
    background: #1AA6B7;
    border-color: #1AA6B7;
}

.ff-matrix-input:checked ~ .ff-mark::after {
    opacity: 1;
}

.ff-matrix-input:focus-visible ~ .ff-mark {
    box-shadow: 0 0 0 3px rgba(26, 166, 183, .3);
}

.ff-matrix td:has(.ff-matrix-input:checked),
.ff-matrix td.is-selected {
    background: #F4FBFC;
    box-shadow: inset 0 0 0 1.5px #1AA6B7;
}

/* Compact option name, only needed once the headers collapse on mobile */
.ff-cell-compact {
    display: none;
}

.ff-cell-size {
    color: #6C7179;
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    margin-top: 1px;
}

/* ------------------------------------------------- mobile: stack the matrix */

@media (max-width: 767px) {
    .ff-matrix-scroll {
        border: 0;
        border-radius: 0;
    }

    .ff-matrix,
    .ff-matrix tbody,
    .ff-matrix tr,
    .ff-matrix td {
        display: block;
        width: auto;
    }

    /* Headers become an option summary above the choices */
    .ff-matrix thead {
        display: block;
    }

    .ff-matrix thead tr {
        background: #F8F8F9;
        border: 1px solid #ECEDEF;
        border-radius: 10px;
        display: block;
        margin-bottom: 14px;
        padding: 4px 0;
    }

    .ff-matrix-corner {
        display: none;
    }

    .ff-matrix-head {
        background: transparent;
        border: 0;
        display: block;
        padding: 10px 14px;
        width: auto;
    }

    .ff-matrix-head + .ff-matrix-head {
        border-top: 1px solid #ECEDEF;
    }

    .ff-matrix-row {
        border: 1px solid #ECEDEF;
        border-radius: 10px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .ff-matrix-row-label {
        background: #F8F8F9;
        border-bottom: 1px solid #ECEDEF;
        display: block;
        font-size: 13px;
        padding: 9px 14px;
    }

    .ff-matrix tbody tr + tr th,
    .ff-matrix tbody tr + tr td {
        border-top: 0;
    }

    .ff-matrix td {
        border-left: 0;
    }

    .ff-matrix td + td {
        border-top: 1px solid #ECEDEF;
    }

    .ff-matrix-cell {
        justify-content: flex-start;
        min-height: 52px;
    }

    .ff-cell-compact {
        color: #19212D;
        display: block;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        text-align: left;
    }

    .ff-matrix td:has(.ff-matrix-input:checked),
    .ff-matrix td.is-selected {
        box-shadow: inset 0 0 0 1.5px #1AA6B7;
    }
}

/* ------------------------------------------------- single-choice cards */

.ff-cards {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .ff-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ff-card {
    align-items: center;
    background: #fff;
    border: 1px solid #DADBDD;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    width: 100%;
}

.ff-card:hover {
    border-color: #1AA6B7;
}

.ff-card:has(.ff-matrix-input:checked),
.ff-card.is-selected {
    background: #F4FBFC;
    border-color: #1AA6B7;
    box-shadow: inset 0 0 0 1px #1AA6B7;
}

/* ------------------------------------------------------------ room tabs */

.ff-config {
    margin-top: 28px;
}

.ff-tabs {
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #ECEDEF;
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ff-tabs::-webkit-scrollbar {
    display: none;
}

.ff-tab {
    align-items: center;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #6C7179;
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    gap: 6px;
    margin-bottom: -1px;
    padding: 11px 14px;
    transition: color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.ff-tab:hover {
    color: #19212D;
}

.ff-tab.is-active {
    border-bottom-color: #1AA6B7;
    color: #19212D;
}

.ff-tab-count {
    background: #ECEDEF;
    border-radius: 20px;
    color: #474D57;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 20px;
    padding: 4px 6px;
    text-align: center;
}

.ff-tab.is-active .ff-tab-count {
    background: #1AA6B7;
    color: #fff;
}

.ff-empty {
    background: #F8F8F9;
    border: 1px dashed #DADBDD;
    border-radius: 10px;
    color: #6C7179;
    font-size: 14px;
    margin-top: 28px;
    padding: 22px 18px;
    text-align: center;
}

/* Collapsed "what is included" note */
.ff-includes {
    background: #F8F8F9;
    border-radius: 10px;
    margin-bottom: 24px;
    padding: 0 14px;
}

.ff-includes > summary {
    color: #19212D;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    padding: 12px 0;
    position: relative;
}

.ff-includes > summary::-webkit-details-marker {
    display: none;
}

.ff-includes > summary::after {
    border-bottom: 2px solid #6C7179;
    border-right: 2px solid #6C7179;
    content: "";
    height: 7px;
    position: absolute;
    right: 2px;
    top: 15px;
    transform: rotate(45deg);
    transition: transform .15s ease;
    width: 7px;
}

.ff-includes[open] > summary::after {
    transform: rotate(-135deg);
    top: 18px;
}

.ff-includes .ff-note-list {
    padding-bottom: 14px;
}

/* --------------------------------------------------------------- submit area */

.ff-submit {
    align-items: center;
    border-top: 1px solid #ECEDEF;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
}

.ff-submit-note {
    color: #6C7179;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.ff-submit .btn {
    padding-left: 32px;
    padding-right: 32px;
}

.ff-errors {
    margin-bottom: 24px;
}

/* ----------------------------------------------------------------- result page */

.ff-total-row td {
    border-top: 2px solid #C8CACD;
}

/* Compact disclaimer: one line, detail behind a disclosure */
.ff-alert-more {
    margin-top: 8px;
}

.ff-alert-more > summary {
    color: #19212D;
    cursor: pointer;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    padding-right: 14px;
    position: relative;
}

.ff-alert-more > summary::-webkit-details-marker {
    display: none;
}

.ff-alert-more > summary::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    height: 6px;
    position: absolute;
    right: 0;
    top: 5px;
    transform: rotate(45deg);
    transition: transform .15s ease;
    width: 6px;
}

.ff-alert-more[open] > summary::after {
    top: 8px;
    transform: rotate(-135deg);
}

.ff-alert-more p {
    font-size: 13px;
    line-height: 1.55;
    margin: 8px 0 0;
}

/* "O que você escolheu" */
.ff-choices-title {
    color: #19212D;
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 14px;
}

.ff-choices {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .ff-choices {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ff-choice {
    border: 1px solid #ECEDEF;
    border-radius: 10px;
    padding: 14px 16px;
}

.ff-choice-title {
    color: #19212D;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.ff-choice-list {
    margin: 0;
}

/* Label left, value right, both on one line: the labels are short nouns
   (getItemNames) rather than the full questions used by the form. */
.ff-choice-row {
    align-items: baseline;
    border-top: 1px solid #F1F2F3;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 6px 0;
}

.ff-choice-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.ff-choice-row dt {
    color: #6C7179;
    flex: 0 1 auto;
    font-size: 13px;
    font-weight: 400;
}

.ff-choice-row dd {
    color: #19212D;
    flex: 0 1 auto;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.ff-expert-img {
    border-radius: 50%;
    height: 64px;
    object-fit: cover;
    width: 64px;
}
