/* ── Inches to Square Feet Converter ───────────────────────────── */

.isf-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(30,64,175,0.12);
    color: #0f172a;
    box-sizing: border-box;
}
.isf-wrap *, .isf-wrap *::before, .isf-wrap *::after { box-sizing: border-box; }

/* ── Header ── */
.isf__header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #1d4ed8 75%, #3b82f6 100%);
    padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
}
.isf__header h2 {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
    font-weight: 900 !important; color: #fff !important;
    margin: 0 0 0.25rem 0 !important; letter-spacing: -0.01em;
}
.isf__header p { font-size: 0.9rem; color: #bfdbfe; margin: 0; }

/* ── Body: two cards side by side ── */
.isf__body {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0;
}
.isf__card {
    flex: 1;
    padding: clamp(1.2rem, 3vw, 1.75rem);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.isf__card-label {
    font-size: 0.78rem; font-weight: 800;
    letter-spacing: 2px; text-transform: uppercase;
    color: #1d4ed8; border-bottom: 2px solid #dbeafe;
    padding-bottom: 0.5rem;
}
.isf__label {
    display: block; font-size: 0.82rem;
    font-weight: 600; color: #0f172a; margin-bottom: 0.4rem;
}

/* ── Input rows ── */
.isf__field-group { display: flex; flex-direction: column; gap: 0.2rem; }
.isf__input-row {
    display: flex; align-items: center;
    border: 2px solid #93c5fd; border-radius: 10px;
    overflow: hidden; transition: border-color 0.2s;
}
.isf__input-row:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.isf__input {
    flex: 1; border: none; outline: none;
    padding: 0.65rem 0.75rem; font-size: 1.05rem;
    color: #0f172a; background: transparent;
    font-weight: 700; font-family: inherit; width: 100%;
}
.isf__input::placeholder { color: #94a3b8; font-weight: 400; font-size: 0.9rem; }
.isf__unit {
    background: #dbeafe; color: #1d4ed8;
    padding: 0.65rem 0.85rem; font-size: 0.85rem;
    font-weight: 700; white-space: nowrap; flex-shrink: 0;
}

/* ── Arrow ── */
.isf__arrow { text-align: center; font-size: 1.4rem; color: #2563eb; line-height: 1; }

/* ── Result box ── */
.isf__result-box {
    background: #eff6ff; border: 2px solid #93c5fd;
    border-radius: 10px; padding: 0.85rem 1rem;
    min-height: 62px; display: flex;
    flex-direction: column; gap: 4px;
    transition: background 0.2s, border-color 0.2s;
}
.isf__result-box.isf--has-value {
    background: #dbeafe; border-color: #3b82f6;
}
.isf__result-main { display: flex; align-items: baseline; gap: 0.5rem; }
.isf__result-val {
    font-size: 1.8rem; font-weight: 900; color: #1e3a8a;
    font-variant-numeric: tabular-nums; line-height: 1;
}
.isf__result-unit { font-size: 0.95rem; font-weight: 700; color: #1d4ed8; }
.isf__result-sub { font-size: 0.78rem; color: #2563eb; font-weight: 600; font-style: italic; }

/* ── Formula ── */
.isf__formula {
    font-size: 0.75rem; color: #64748b; line-height: 1.6;
    background: #f8fafc; border-left: 3px solid #93c5fd;
    padding: 0.5rem 0.75rem; border-radius: 0 6px 6px 0;
}

/* ── Clear button ── */
.isf__clear-btn {
    align-self: flex-start; background: none;
    border: 1.5px solid #cbd5e1; border-radius: 7px;
    padding: 0.35rem 0.85rem; font-size: 0.78rem;
    color: #64748b; cursor: pointer; transition: all 0.15s;
    font-weight: 600; font-family: inherit;
}
.isf__clear-btn:hover { border-color: #ef4444; color: #ef4444; background: #fff5f5; }

/* ── Divider ── */
.isf__divider {
    display: flex; align-items: center; justify-content: center;
    width: 48px; min-width: 48px; background: #eff6ff;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; color: #1d4ed8;
    border-left: 1px solid #dbeafe; border-right: 1px solid #dbeafe;
}

/* ── Tables ── */
.isf__table-section {
    padding: clamp(1rem, 3vw, 1.5rem);
    background: #fff; border-top: 1.5px solid #dbeafe;
}
.isf__table-section--alt { background: #f8faff; }
.isf__table-title {
    font-size: clamp(0.9rem, 2.5vw, 1rem) !important;
    font-weight: 800 !important; color: #0f172a !important;
    margin: 0 0 0.85rem !important;
}
.isf__table-wrap { overflow-x: auto; }
.isf__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.isf__table thead tr { background: linear-gradient(90deg, #0f172a, #1d4ed8); }
.isf__table thead th {
    color: #fff; padding: 0.6rem 1rem; text-align: left;
    font-weight: 700; font-size: 0.82rem; white-space: nowrap;
}
.isf__table tbody tr:nth-child(even) { background: #eff6ff; }
.isf__table tbody tr:hover { background: #dbeafe; }
.isf__table tbody td {
    padding: 0.5rem 1rem; color: #0f172a;
    font-weight: 500; border-bottom: 1px solid #dbeafe;
}
.isf__ft-cell {
    color: #1e3a8a; font-weight: 800; font-size: 0.95rem;
}

/* ── Note ── */
.isf__note {
    background: #eff6ff; border-top: 1.5px solid #93c5fd;
    padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
    font-size: 0.82rem; color: #0f172a; line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .isf__body { flex-direction: column; }
    .isf__divider {
        width: 100%; min-width: unset; height: 36px;
        border-left: none; border-right: none;
        border-top: 1px solid #dbeafe; border-bottom: 1px solid #dbeafe;
    }
    .isf__card { padding: 1rem; }
}
