/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.c-matter--article .c-matter__body {
    max-width: 1000px;
    width: 100%;
}
@media (max-width: 1200px) {
    .c-matter--article .c-matter__body {
        max-width: 100%;
    }
}

.cgt-container {
    max-width: 1170px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

/* Header styles */
.cgt-header {
    text-align: center;
    margin-bottom: 40px;
}

.cgt-title {
    margin-bottom: 10px;
}

.cgt-subtitle {
    opacity: 0.9;
}

/* Main content */
.cgt-main {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Form layout - two column on desktop */
.cgt-form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* Form sections */
.cgt-input-section {
    padding: 2rem;
    border-right: 1px solid #e1e5e9;
}

.cgt-disclaimer {
    margin-bottom: 1.5rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

.cgt-results-section {
    padding: 2rem;
    background: #f8f9fa;
}

.cgt-input-section .cgt-section-title, .cgt-results-section .cgt-section-title {
    margin-bottom: 25px;
}

/* Form groups */
.cgt-form-group {
    margin-bottom: 25px;
}

.cgt-label {
    display: block;
    margin-bottom: 8px;
    color: #555;
}

/* Slider components */
.cgt-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cgt-slider-header .cgt-label {
    margin-bottom: 0;
}

.cgt-value-display {
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
    outline: none;
    width: 40%;
    font-size: inherit;
}

.cgt-value-display:focus {
    border-color: #2d69ff;
    box-shadow: 0 0 0 2px rgba(45, 105, 255, 0.1);
}

.cgt-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 15px 0;
    position: relative;
}

.cgt-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2d69ff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    margin-top: -7px;
}

.cgt-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2d69ff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.cgt-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(to right, #2d69ff 0%, #2d69ff var(--slider-progress, 0%), #e5e7eb var(--slider-progress, 0%), #e5e7eb 100%);
    border-radius: 3px;
}

.cgt-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e5e7eb;
    border-radius: 3px;
}

.cgt-slider::-moz-range-progress {
    background: #2d69ff;
    height: 6px;
    border-radius: 3px;
}

.cgt-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: #666;
    font-size: 0.875rem;
}

.cgt-input,
.cgt-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.cgt-input:focus,
.cgt-select:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 105, 255, 0.1);
}

.cgt-input:invalid,
.cgt-select:invalid {
    border-color: #dc3545;
}

/* Additional styling for select dropdown */
.cgt-select {
    cursor: pointer;
    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 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.cgt-select option {
    padding: 10px;
    background: white;
    color: #333;
}

.cgt-select option:hover {
    background: #f8f9fa;
}

/* Error messages */
.cgt-error-message {
    color: #dc3545;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

/* Buttons */
.cgt-button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;

}

.cgt-btn {
    flex: 1;
}



/* Results section - background already set above */

.cgt-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e1e5e9;
    font-size: 1.3rem;
}

.cgt-result-item:last-child {
    border-bottom: none;
}

.cgt-result-label {
    color: #555;
}

        /* Graph section */
        .cgt-graph-section {
            margin-top: 30px;
        }

        /* Results disclosure */
        .cgt-results-disclosure {
            margin-top: 30px;
            padding-top: 30px;
            border-top: 1px solid #e1e5e9;
        }

        .cgt-disclosure-text {
            color: #555;
            line-height: 1.6;
            margin: 0;
        }

        .cgt-graph-title {
            margin-bottom: 20px;
        }

        .cgt-graph-container {
            display: flex;
            justify-content: center;
            align-items: center;
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        #cgt-graph {
            max-width: 100%;
            height: auto;
        }

/* Footer */
.cgt-footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
}

.cgt-footer-text {
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .cgt-container {
        padding: 1rem;
    }
    
    .cgt-form-layout {
        grid-template-columns: 1fr;
    }
    
    .cgt-input-section {
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .cgt-results-section {
        padding: 1.5rem;
    }
    
    .cgt-button-group {
        flex-direction: column;
    }
    
    .cgt-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cgt-result-value {
        align-self: flex-end;
    }
    
    .cgt-slider-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cgt-slider-header .cgt-label {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .cgt-value-display {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cgt-input-section, .cgt-results-section {
        padding: 1rem;
    }
    
    .cgt-input, .cgt-select {
        padding: 12px;
    }
    
    .cgt-btn {
        padding: 12px 20px;
    }
}

/* Animation for results */
.cgt-results-section {
    animation: slideIn 0.5s ease-out;
}

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

/* Success state for inputs - removed green highlight */

/* Loading state */
.cgt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Charts section */
.cgt-charts-section {
    width: 100%;
    max-width: 100%;
    margin-top: 3rem;
    padding: 0 2rem;
}

.cgt-chart-container {
    width: 100%;
    margin-bottom: 3rem;
}

.cgt-chart-title {
    margin-bottom: 1.5rem;
    text-align: center;
}

.cgt-table-wrapper {
    width: 100%;
    overflow-x: auto;
    font-size: 0.875rem;
}

.cgt-tax-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.cgt-tax-table thead {
    background: #f8f9fa;
}

.cgt-tax-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e1e5e9;
    color: #333;
}

.cgt-tax-table td {
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    color: #555;
}

.cgt-tax-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.cgt-tax-table tbody tr:hover {
    background: #e9ecef;
}

/* Responsive table styles */
@media (max-width: 768px) {
    .cgt-charts-section {
        padding: 0 1rem;
        margin-top: 2rem;
    }
    
    .cgt-chart-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .cgt-tax-table {
        font-size: 0.875rem;
    }
    
    .cgt-tax-table th,
    .cgt-tax-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .cgt-charts-section {
        padding: 0 0.5rem;
    }
    
    .cgt-chart-container {
        padding: 1rem;
    }
    
    .cgt-tax-table {
        font-size: 0.75rem;
    }
    
    .cgt-tax-table th,
    .cgt-tax-table td {
        padding: 6px 8px;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .cgt-container {
        max-width: none;
        padding: 0;
    }
    
    .cgt-btn {
        display: none;
    }
    
    .cgt-results-section {
        display: block !important;
    }
}
