#qld-calculators,
.qld-calc-standalone {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* background: #ffffff; */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.qld-calc-standalone {
    background: #fff;
}

.calc-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    border-bottom: 2px solid #0073aa;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: normal;
}

.calc-tabs li {
    flex: 1 1 0;
    min-width: 50px;
    padding: 8px 10px;
    cursor: pointer;
    background: #f1f3f4;
    margin-right: 4px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
    white-space: normal;
}

.calc-tabs li:last-child {
    margin-right: 0;
}

.calc-tabs li.active {
    background: #0073aa;
    color: #fff;
}

.calc-tabs li:hover {
    background: #e2e4e7;
}

.calc-tab-content {
    display: none;
    padding: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.calc-tab-content.active {
    display: block;
}

.step.hidden, #single-income.hidden, #joint-incomes.hidden {
    display: none;
}

.calc-tab-content label {
    display: block;
    margin: 6px 0 3px;
    font-weight: 600;
    font-size: 12px;
    color: #1a1a1a;
}

.calc-input, .calc-select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 3px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.calc-input:focus, .calc-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background: #fff;
}

.calc-checkbox {
    margin: 10px 8px 10px 0;
    vertical-align: middle;
    accent-color: #0073aa;
}

.calc-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: background 0.3s ease;
    display: inline-block;
    margin: 8px 4px 0 0;
}

.calc-button:hover {
    background: #005177;
}

.step-button {
    background: #6b7280;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    display: inline-block;
    margin: 8px 4px 0 0;
}

.step-button.next-button {
    background: #0073aa;
}

.step-button.prev-button {
    background: #4b5563;
}

.step-button.next-button:hover {
    background: #005177;
}

.step-button.prev-button:hover {
    background: #374151;
}

.calc-result {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.calc-result:empty {
    display: none;
}

/* Amortization Schedule Styles */
.calc-amortization {
    margin-top: 20px;
}

.calc-amortization h4 {
    margin: 20px 0 10px 0;
    color: #333;
    font-size: 16px;
}

.amortization-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.amortization-table th {
    background: #0073aa;
    color: white;
    padding: 10px 8px;
    text-align: right;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.amortization-table th:first-child {
    text-align: left;
}

.amortization-table td {
    padding: 8px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.amortization-table td:first-child {
    text-align: left;
}

.amortization-table tbody tr:hover {
    background: #f5f5f5;
}

.amortization-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.disclaimer {
    font-size: 12px;
    color: #4b5563;
    margin-top: 16px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    #qld-calculators,
    .qld-calc-standalone {
        padding: 16px;
    }

    .calc-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calc-tabs li {
        font-size: 10px;
        padding: 6px 8px;
        min-width: 45px;
        margin-right: 2px;
    }

    .calc-tab-content {
        padding: 16px;
    }

    .calc-input, .calc-select {
        padding: 8px 10px;
    }

    .calc-button, .step-button {
        width: 100%;
        padding: 12px;
        margin: 6px 0;
    }

    .calc-tab-content label {
        font-size: 11px;
    }
}
