@charset "utf-8";

:root {
    --primary-color: #004b87;
    --primary-hover: #003663;
    --bg-color: #f4f6f9;
    --card-bg: #fff;
    --border-color: #e2e8f0;
    --text-main: #2d3748;
    --text-muted: #718096;
}

body {
    margin: 0;
    padding: 30px 15px;
    color: var(--text-main);
    font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
}

.estimator-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
}

.header-section {
    margin-bottom: 30px;
    text-align: center;
}

.header-section img {
    max-height: 75px;
    margin-bottom: 15px;
}

.header-section h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.header-section h2 {
    margin: 5px 0 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 500;
}

.zh-text {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.88em;
    font-weight: 400;
}

.intro-card {
    margin-bottom: 25px;
    padding: 16px 20px;
    font-size: 0.95rem;
    background-color: #f0f4f8;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.intro-card p {
    margin: 6px 0;
}

.warning-text {
    margin-top: 8px !important;
    color: #c53030;
    font-weight: 500;
}

.validation-error {
    margin-bottom: 15px;
    padding: 12px 16px;
    color: #9b2c2c;
    font-weight: 600;
    background-color: #fff5f5;
    border-left: 4px solid #c53030;
    border-radius: 6px;
}

.required-note {
    margin-bottom: 10px;
    color: #e53e3e;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: right;
}

.bottom-disclaimer {
    margin-top: 25px;
    padding: 16px 20px;
    color: #2d3748;
    font-size: 0.92rem;
    line-height: 1.6;
    background-color: #fff;
}

.bottom-disclaimer p {
    margin: 8px 0;
}

.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    min-width: 180px;
    font-weight: 600;
}

.family-members-input {
    width: 140px;
    margin-left: 15px;
}

.single-parent-row {
    margin-top: 15px;
}

.single-parent-input {
    margin-left: 15px;
}

.single-parent-input input {
    cursor: pointer;
    transform: scale(1.2);
}

input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.95rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    transition: all 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgb(0 75 135 / 15%);
}

.styled-table {
    width: 100%;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-spacing: 0;
    border-radius: 8px;
}

.styled-table th {
    padding: 12px 16px;
    color: #fff;
    font-weight: 600;
    text-align: left;
    background-color: var(--primary-color);
}

.table-heading-translation {
    color: #e2e8f0;
}

.styled-table td {
    padding: 10px 16px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.styled-table tr:last-child td {
    border-bottom: none;
}

.styled-table tr.deduct-row td {
    background-color: #fffaf0;
}

.static-deduct-val {
    padding-left: 12px;
    color: #4a5568;
    font-weight: 600;
}

.btn-group {
    margin-top: 25px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    margin-left: 10px;
    color: #fff;
    background-color: #a0aec0;
}

.btn-secondary:hover {
    background-color: #718096;
}

.result-container {
    padding: 10px 0;
}

.result-title {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
}

.result-highlight-bar {
    margin-bottom: 25px;
    padding: 15px 20px;
    color: #2b2c34;
    font-size: 1.15rem;
    font-weight: 700;
    background-color: #fff9db;
    border-left: 5px solid #f59f00;
    border-radius: 4px;
}

.result-block {
    margin-bottom: 20px;
}

.mini-table {
    width: 100%;
    margin-bottom: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-collapse: collapse;
    border-radius: 6px;
}

.mini-table td {
    padding: 12px 18px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

.result-label-cell {
    width: 65%;
    background-color: #f8fafc;
}

.result-value-cell {
    width: 35%;
}

.result-total-row {
    background-color: #f0f4f8;
}

.policy-card {
    margin-top: 25px;
    padding: 18px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.policy-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
}

.policy-link:hover {
    color: var(--primary-hover);
}
