/* Freelance Tax Estimator — custom styles */

/* Input section */
.input-section {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
}

/* Form groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Country note */
.country-note {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* Calculate button */
#calculate {
    display: block;
    width: 100%;
    padding: 0.7rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: background 0.2s;
}

#calculate:hover {
    background: #1d4ed8;
}

/* Results section */
.results {
    display: none;
}

.results.show {
    display: block;
}

/* Summary cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}

/* Breakdown table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.breakdown-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    border-bottom: 2px solid #e0e6ed;
}

.breakdown-table th.amount,
.breakdown-table td.amount {
    text-align: right;
}

.breakdown-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

/* Disclaimer */
.disclaimer {
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.5;
    margin-top: 1rem;
}

/* How-to */
.howto {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.howto h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.howto ol {
    padding-left: 1.25rem;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.8;
}

/* FAQ */
.faq {
    margin-top: 1.5rem;
}

.faq h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.faq details {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq details summary {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: #f9fafb;
    color: #111827;
    list-style: none;
}

.faq details summary::-webkit-details-marker {
    display: none;
}

.faq details p {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    border-top: 1px solid #e0e6ed;
    margin: 0;
}

/* Related */
.related {
    margin-top: 1.5rem;
}

.related h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related ul li a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.related ul li a:hover {
    background: #dbeafe;
}

/* Dark mode */
html[data-theme="dark"] .input-section,
html[data-theme="dark"] .card,
html[data-theme="dark"] .howto {
    background: #1f2937;
    border-color: #374151;
}

html[data-theme="dark"] .form-group label {
    color: #d1d5db;
}

html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .card-label {
    color: #9ca3af;
}

html[data-theme="dark"] .card-value {
    color: #f9fafb;
}

html[data-theme="dark"] .breakdown-table th {
    background: #111827;
    color: #d1d5db;
    border-color: #374151;
}

html[data-theme="dark"] .breakdown-table td {
    color: #d1d5db;
    border-color: #374151;
}

html[data-theme="dark"] .disclaimer {
    background: #451a03;
    border-color: #92400e;
    color: #fcd34d;
}

html[data-theme="dark"] .howto h2,
html[data-theme="dark"] .faq h2,
html[data-theme="dark"] .related h2 {
    color: #f9fafb;
}

html[data-theme="dark"] .howto ol {
    color: #d1d5db;
}

html[data-theme="dark"] .faq details {
    border-color: #374151;
}

html[data-theme="dark"] .faq details summary {
    background: #111827;
    color: #f9fafb;
}

html[data-theme="dark"] .faq details p {
    color: #d1d5db;
    border-color: #374151;
}

html[data-theme="dark"] .related ul li a {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}
