/* ══════════════════════════════════════════════════════════════════════
   Square Feet <-> Square Yard Converter - tool-specific styles
   Loaded by both /square-feet-to-square-yard-converter and
   /square-yard-to-square-feet-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. (The old plot-preview styles are gone.)
   ══════════════════════════════════════════════════════════════════════ */

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

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

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

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

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

/* Minimum comfortable touch target for this page's own controls (the element selector outranks the site-wide input sizing). */
.sqyd-page .tap-target,
.sqyd-page input.tap-target,
.sqyd-page select.tap-target {
    min-height: 44px;
}
.sqyd-page button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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