/**
 * Capital Gains Tax Calculator CSS
 * Styling for the Capital Gains Tax Calculator page
 */

/* Base styling for calculator */
.capital-gains-calculator {
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* Form styling */
.calculator-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: all 0.3s ease;
}

.dark .calculator-form {
    background: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.calculator-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.calculator-header h2 {
    color: #16a34a;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dark .calculator-header h2 {
    color: #4ade80;
}

.calculator-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.dark .calculator-header p {
    color: #cbd5e1;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
}

.dark .input-group label {
    color: #f3f4f6;
}

.input-group input[type="number"],
.input-group input[type="date"],
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    color: #1e293b;
    transition: border-color 0.2s ease;
}

.dark .input-group input[type="number"],
.dark .input-group input[type="date"],
.dark .input-group select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.input-group input[type="number"]:focus,
.input-group input[type="date"]:focus,
.input-group select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.date-inputs {
    display: grid;
    gap: 1rem;
}

.slider-container {
    margin-top: 0.5rem;
}

.slider-container input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
}

/* Radio buttons styling */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-button {
    position: relative;
}

.radio-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button label {
    display: block;
    padding: 0.5rem 1rem;
    background-color: #f1f5f9;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

.dark .radio-button label {
    background-color: #374151;
    color: #cbd5e1;
}

.radio-button input[type="radio"]:checked + label {
    background-color: #16a34a;
    color: white;
}

.dark .radio-button input[type="radio"]:checked + label {
    background-color: #15803d;
}

.radio-button input[type="radio"]:focus + label {
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.3);
}

/* Switch toggle styling */
.toggle-switch {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin: 0 0.5rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.dark .slider {
    background-color: #4b5563;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #16a34a;
}

.dark input:checked + .slider {
    background-color: #15803d;
}

input:focus + .slider {
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.3);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Calculate button styling */
button[type="submit"] {
    width: 100%;
    padding: 0.9rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.dark button[type="submit"] {
    background-color: #15803d;
}

button[type="submit"]:hover {
    background-color: #15803d;
}

.dark button[type="submit"]:hover {
    background-color: #166534;
}

/* Results section styling */
.results-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: none;
    transition: all 0.3s ease;
    height: 100%;
}

.dark .results-section {
    background: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.results-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-heading {
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-heading h3 {
    color: #16a34a;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dark .results-heading h3 {
    color: #4ade80;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background-color: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
}

.dark .result-card {
    background-color: #374151;
}

.result-card.highlight {
    background-color: #dcfce7;
    border: 1px solid #16a34a;
}

.dark .result-card.highlight {
    background-color: #065f46;
    border: 1px solid #34d399;
}

.result-card h4 {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dark .result-card h4 {
    color: #cbd5e1;
}

.result-value {
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
}

.dark .result-value {
    color: #f3f4f6;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.action-button {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .action-button {
    background-color: #15803d;
}

.action-button i {
    margin-right: 0.5rem;
}

.action-button.secondary {
    background-color: #0891b2;
}

.dark .action-button.secondary {
    background-color: #0e7490;
}

.action-button:hover {
    background-color: #15803d;
}

.action-button.secondary:hover {
    background-color: #0e7490;
}

.dark .action-button:hover {
    background-color: #166534;
}

.dark .action-button.secondary:hover {
    background-color: #155e75;
}

/* Chart section styling */
.chart-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .chart-section {
    background-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chart-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 1rem;
}

.dark .chart-section h3 {
    color: #f3f4f6;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Breakdown table styling */
.breakdown-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .breakdown-section {
    background-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.breakdown-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 1rem;
}

.dark .breakdown-section h3 {
    color: #f3f4f6;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.breakdown-table th,
.breakdown-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.dark .breakdown-table th,
.dark .breakdown-table td {
    border-bottom: 1px solid #374151;
}

.breakdown-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

.dark .breakdown-table th {
    background-color: #374151;
    color: #f3f4f6;
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

/* FAQ section styling */
.faq-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .faq-section {
    background-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.faq-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 1.5rem;
}

.dark .faq-section h3 {
    color: #f3f4f6;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.dark .faq-item {
    border-color: #374151;
}

.faq-question {
    padding: 1rem 1.5rem;
    background-color: #f8fafc;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.dark .faq-question {
    background-color: #374151;
    color: #f3f4f6;
}

.faq-question:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    right: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-question.active {
    background-color: #dcfce7;
    color: #16a34a;
}

.dark .faq-question.active {
    background-color: #065f46;
    color: #34d399;
}

.faq-question.active:after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background-color: #fff;
    color: #64748b;
    transition: all 0.3s ease;
}

.dark .faq-answer {
    background-color: #1f2937;
    color: #cbd5e1;
}

.faq-answer.active {
    padding: 1.5rem;
    max-height: 500px;
}

/* Information section styling */
.info-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .info-section {
    background-color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.info-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 1.5rem;
}

.dark .info-section h3 {
    color: #f3f4f6;
}

.info-section p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.dark .info-section p {
    color: #cbd5e1;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .calculator-form,
    .results-section,
    .chart-section,
    .breakdown-section,
    .faq-section,
    .info-section {
        padding: 1.25rem;
    }
}

/* Animation for result section appearance */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section.active,
.chart-section,
.breakdown-section {
    animation: slideIn 0.4s ease-out;
} 