/* ══════════════════════════════════════════════════════════════════════
   Square Meter <-> Square Feet Converter - tool-specific styles
   Loaded by both /square-meter-to-square-feet-converter and
   /square-feet-to-square-meter-converter. Everything is scoped to the
   converter page content so it cannot leak into the header, search modal
   or any other input on the page.
   ══════════════════════════════════════════════════════════════════════ */

.converter-surface {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Number input: no spin buttons. The surrounding card shows the focus ring (focus-within). */
#converter-workspace input[type="number"]::-webkit-inner-spin-button,
#converter-workspace input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#converter-workspace input[type="number"] {
    -moz-appearance: textfield;
}
/* The site-wide input style paints a white box; the card around the input already provides the field look. */
#converter-workspace #areaValue {
    background-color: transparent;
    box-shadow: none;
}
#converter-workspace input[type="number"]:focus,
#converter-workspace input[type="number"]:focus-visible {
    outline: none;
}

/* Visible keyboard focus for every control in the converter and the size table. */
.sqm-page button:focus-visible,
.sqm-page a:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 0.5rem;
}
.dark .sqm-page button:focus-visible,
.dark .sqm-page a:focus-visible {
    outline-color: #34d399;
}

/* Size-table rows are clickable for mouse users and reachable by keyboard through the button. */
.sqm-page .ref-row {
    cursor: pointer;
}
.sqm-page .ref-row:focus-within {
    background-color: rgba(16, 185, 129, 0.08);
}

/* Primary result: large and never clipped on narrow phones. */
.sqm-page .result-figure {
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* Minimum comfortable touch target for the converter's own controls. */
.sqm-page .tap-target {
    min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .converter-surface {
        transition: none;
    }
}
