@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.soh-wrapper {
    font-family: 'Inter', sans-serif;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border-radius: 24px;
    margin: 2rem auto;
    max-width: 900px;
}

.soh-wrapper * {
    box-sizing: border-box;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.soh-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.1),
                inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.soh-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
    color: #0A558C;
}

.soh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: end;
}

.soh-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.soh-label {
    font-weight: 600;
    color: #DB3D6D;
    font-size: 0.85rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.soh-input-group,
.soh-output-group {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.soh-input,
.soh-output {
    width: 100%;
    max-width: 65px;
    height: 48px;
    padding: 0 0.25rem;
    font-size: 1rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    font-family: inherit;
    font-weight: 600;
}

.soh-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.soh-input::-webkit-outer-spin-button,
.soh-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.soh-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.soh-unit {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
    white-space: nowrap !important;
}

/* Masterpiece styling for the output fields */
.soh-output-group {
    width: 100%;
}
.soh-output {
    max-width: 100%;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
    color: #065f46;
    font-weight: 700;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .soh-wrapper {
        padding: 1rem;
    }
    .soh-card {
        padding: 1.5rem;
    }
    .soh-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .soh-wrapper {
        padding: 0.5rem;
    }
    .soh-card {
        padding: 1.25rem;
    }
    .soh-title {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }
    .soh-input-group {
        gap: 0.25rem;
    }
    .soh-input {
        max-width: 60px;
        padding: 0 0.15rem;
    }
    .soh-unit {
        font-size: 0.85rem;
    }
}
