/* Product comment field — hand-written (no build step), loaded only on comment products.
   Brand tokens: primary #7bc29e, secondary #41423f. Mobile-first. */

.fb-comments {
    width: 100%;
    max-width: 100%;
}

.fb-comments__label {
    display: block;
}

.fb-comments__raw {
    max-width: 100%;
    resize: vertical;
}

/* Once the row editor is active the textarea stays in the DOM (it is the submitted
   field) but is removed from the visual and keyboard flow. */
.fb-comments__raw.is-enhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap;
    border: 0 !important;
}

.fb-comments__rows {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: fb-comment;
}

.fb-comments__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    counter-increment: fb-comment;
}

.fb-comments__num {
    flex: 0 0 2rem;
    min-width: 2rem;
    text-align: right;
    font-weight: 700;
    color: #41423f;
    font-variant-numeric: tabular-nums;
}

.fb-comments__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid #7bc29e;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    font: inherit;
    line-height: 1.4;
    background: #fff;
    color: #41423f;
}

.fb-comments__input:focus {
    outline: 2px solid #41423f;
    outline-offset: 2px;
}

.fb-comments__remove {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #41423f;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.fb-comments__remove:hover {
    background: rgba(123, 194, 158, 0.15);
}

.fb-comments__remove:focus-visible {
    outline: 2px solid #41423f;
    outline-offset: 2px;
}

.fb-comments__status {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    color: #41423f;
}

.fb-comments__status.is-error {
    color: #b42318;
    font-weight: 700;
}

.fb-comments__row.is-invalid .fb-comments__input {
    border-color: #b42318;
}

@media (max-width: 480px) {
    .fb-comments__num {
        flex-basis: 1.5rem;
        min-width: 1.5rem;
    }

    .fb-comments__input {
        padding: 0.625rem 0.75rem;
    }
}

/* Visually hidden row labels (read by screen readers). */
.fb-comments__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap;
    border: 0 !important;
}
