/* ─── Wrapper ────────────────────────────────────────────────── */
.sc-wrapper {
    max-width: 520px;
    margin: 30px auto;
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.sc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.sc-tabs button {
    flex: 1 1 auto;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #f1f3f5;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    transition: all 0.2s ease;
}

.sc-tabs button:hover {
    background: #e0e3e7;
    color: #111;
}

.sc-tabs button.active {
    background: #0073aa;
    color: #fff;
}

/* ─── Tab Content ────────────────────────────────────────────── */
.sc-tab {
    animation: fadeIn 0.2s ease;
}

/* ─── Labels ─────────────────────────────────────────────────── */
.sc-tab label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Inputs & Select ────────────────────────────────────────── */
.sc-tab input,
.sc-tab select {
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    font-size: 14px;
    color: #222;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.sc-tab select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}

.sc-tab input:focus,
.sc-tab select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
    background: #fff;
}

/* ─── Calculate Button ───────────────────────────────────────── */
.sc-tab button {
    width: 100%;
    padding: 13px;
    margin-top: 2px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #0073aa, #005177);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.sc-tab button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 115, 170, 0.25);
}

.sc-tab button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ─── Result ─────────────────────────────────────────────────── */
.sc-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f0f7fb;
    border-left: 4px solid #0073aa;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.7;
    color: #003d5c;
    white-space: pre-line;
    word-break: break-word;
}

/* ─── Error state ────────────────────────────────────────────── */
.sc-result.sc-error {
    background: #fff5f5;
    border-left-color: #e53e3e;
    color: #c53030;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

/* ─── Fade in ────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .sc-wrapper {
        padding: 16px;
        border-radius: 12px;
    }

    .sc-tabs button {
        font-size: 12px;
        padding: 8px 6px;
    }

    .sc-result {
        font-size: 13px;
    }
}