/* =====================================================
   NZ TAX CALCULATOR – Widget Styles
   assets/css/calculators/nz-tax-calculator.css
===================================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

.tax-widget-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- Calculator Form ---------- */
.calculator-form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-header {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-field,
select.input-field {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- Radio / Toggle ---------- */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 16px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.radio-option:hover {
    background: #e2e8f0;
}

.radio-option input {
    transform: scale(1.2);
    margin-right: 8px;
    accent-color: var(--primary);
}

/* ---------- Two-column grid for inputs ---------- */
.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .input-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Calculate Button ---------- */
.calc-action-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.25);
}

.calc-action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(37, 99, 235, 0.3);
}

/* ---------- Result Section ---------- */
.result-container {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero "Net Pay" card */
.hero-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.hero-label {
    opacity: 0.9;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.hero-value {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-sub {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* Result layout: chart + breakdown side by side */
.result-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 700px) {
    .result-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Donut chart */
.chart-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.chart-container {
    width: 180px;
    height: 180px;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(#ef4444 0% var(--tax),
            #3b82f6 var(--tax) var(--acc),
            #f59e0b var(--acc) var(--ks),
            #10b981 var(--ks) 100%);
    transition: background 0.6s;
}

@property --tax {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

@property --acc {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

@property --ks {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

.chart-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 136px;
    height: 136px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Colour dots legend */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.dot.tax { background: #ef4444; }
.dot.acc { background: #3b82f6; }
.dot.ks  { background: #f59e0b; }
.dot.net { background: #10b981; }

/* Tax Breakdown Table */
.tax-breakdown {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
}

.breakdown-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1rem;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.breakdown-row .row-value {
    font-weight: 600;
}

.breakdown-row.total-row .row-value {
    color: #ef4444;
    font-size: 1.05rem;
}

/* Disclaimer */
.disclaimer-text {
    margin-top: 18px;
    font-size: 0.83rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.5;
}

/* ---------- Info Sections ---------- */
.info-section section {
    margin-bottom: 60px;
}

.info-section h2 {
    font-size: 1.8rem;
    color: #0f172a;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-section h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 32px;
    background: var(--primary);
    border-radius: 4px;
}

/* Tax bracket table */
.gst-rate-table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.gst-rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
}

.gst-rate-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.gst-rate-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

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

.gst-rate-table tr:hover {
    background: #f8fafc;
}

.gst-rate-table .rate-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Highlight box */
.info-highlight {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    font-size: 0.97rem;
    line-height: 1.7;
    color: #334155;
    margin: 20px 0;
}

/* Step list */
.step-list {
    display: grid;
    gap: 14px;
}

.step-item {
    display: flex;
    gap: 18px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    align-items: flex-start;
}

.step-number {
    min-width: 36px;
    height: 36px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Feature cards */
.content-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.feature-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feature-card h4 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-card p {
    color: #64748b;
    font-size: 0.93rem;
    line-height: 1.6;
}

/* Highlights grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.highlight-item {
    background: #f8fafc;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 14px;
}

.highlight-item i {
    color: var(--primary);
    font-size: 1.15rem;
}

/* FAQ */
.faq-section {
    background: #f8fafc;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.faq-accordion {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question i {
    font-size: 0.85rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.3s ease;
    padding: 0 24px;
    background: #fff;
    color: #475569;
    line-height: 1.7;
    font-size: 0.97rem;
}

.faq-item.active .faq-answer {
    max-height: 400px;
    padding: 0 24px 20px;
}
