body {
    font-family: Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: #555;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

/* Disclaimer Modal Styles */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.disclaimer-content {
    background: white;
    max-width: 600px;
    max-height: 80vh;
    margin: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: disclaimerFadeIn 0.3s ease-out;
}

@keyframes disclaimerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.disclaimer-header {
    background-color: #dc3545;
    color: white;
    padding: 20px;
    text-align: center;
}

.disclaimer-header h3 {
    margin: 0;
    font-size: 20px;
}

.disclaimer-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
    line-height: 1.6;
}

.disclaimer-body p {
    margin-bottom: 15px;
}

.disclaimer-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.disclaimer-body li {
    margin-bottom: 8px;
}

.disclaimer-footer {
    padding: 20px;
    background-color: #f8f9fa;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Results Disclaimer */
.results-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.results-disclaimer h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #856404;
}

.results-disclaimer p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.results-disclaimer strong {
    font-weight: 600;
}

/* Rest of existing styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="number"]:focus::placeholder {
    opacity: 0;
}

input[type="checkbox"] {
    margin-right: 8px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
}

button:hover {
    background-color: #0056b3;
}

button.btn-secondary {
    background-color: #6c757d;
}

button.btn-secondary:hover {
    background-color: #545b62;
}

button.btn-danger {
    background-color: #dc3545;
}

button.btn-danger:hover {
    background-color: #c82333;
}

button.btn-success {
    background-color: #28a745;
}

button.btn-success:hover {
    background-color: #218838;
}

.submit-btn {
    width: 100%;
    margin-top: 20px;
}

/* Self-Employment calculation section styling */
.self-employment-calculation-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

.calculation-display {
    padding: 8px 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    font-family: 'Courier New', monospace;
}

.self-employment-breakdown {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.w2-entry {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.w2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.w2-fields {
    display: grid;
    gap: 15px;
    align-items: start;
}

.w2-field-container {
    display: flex;
    flex-direction: column;
}

.fica-info {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    min-height: 18px;
    line-height: 1.2;
}

/* Specific width for withholding override input */
.withholding-override input[type="number"] {
    width: 140px;
}

.withholding-override {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    display: none;
}

.results {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: none;
}

.results h2 {
    color: #333;
    margin-top: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

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

.result-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.result-highlight {
    font-weight: bold;
    font-size: 18px;
    color: #007bff;
}

.quarterly-highlight {
    background-color: #d1ecf1;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border-left: 4px solid #bee5eb;
}

.export-section {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: none;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    display: none;
}

.qbi-info {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 14px;
}

/* Tax bracket breakdown styles */
.tax-bracket-breakdown {
    margin: 15px 0 10px 30px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bracket-header {
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.bracket-item {
    display: grid;
    grid-template-columns: 2fr 80px 3fr;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    margin: 2px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

.bracket-range {
    color: #495057;
    font-weight: 500;
}

.bracket-rate {
    text-align: center;
    color: #007bff;
    font-weight: bold;
}

.bracket-calculation {
    color: #28a745;
    text-align: right;
}

.bracket-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-weight: bold;
    color: #495057;
}

/* Calculation breakdown styles */
.calculation-breakdown {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.breakdown-steps {
    margin: 10px 0;
}

.step-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.step-item:hover {
    background-color: #e9ecef;
}

.step-number {
    font-weight: bold;
    color: #007bff;
    min-width: 20px;
    text-align: center;
}

.step-description {
    flex: 1;
    margin-left: 10px;
    color: #333;
}

.step-value {
    font-weight: bold;
    color: #28a745;
    min-width: 120px;
    text-align: right;
}

.step-explanation {
    margin-top: 10px;
    padding: 10px;
    background-color: #e8f4fd;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.step-explanation small {
    color: #0c5460;
    line-height: 1.4;
}

/* Info icon and panel styles */
.info-icon {
    cursor: pointer;
    color: #007bff;
    margin-left: 5px;
    font-size: 14px;
    user-select: none;
}

.info-icon:hover {
    color: #0056b3;
}

.info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    z-index: 1000;
    display: none;
}

.info-panel-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-panel-header h4 {
    margin: 0;
    color: #333;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #adb5bd;
    line-height: 1;
    user-select: none;
}

.close-btn:hover {
    color: #6c757d;
}

.info-panel-content {
    padding: 20px;
}

.info-panel-content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.info-panel-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-panel-content li {
    margin-bottom: 5px;
}

/* Overlay to darken background when info panel is open */
.info-panel::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

@media (max-width: 768px) {
    .w2-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-panel {
        max-width: 90%;
        margin: 0 5%;
    }

    .disclaimer-content {
        margin: 10px;
        max-width: 90%;
    }

    .self-employment-calculation-section {
        padding: 15px;
    }
}