/* ===========================================
    Professional Income Tax Calculator - Tool Specific Styles (Compact)
    =========================================== */

.itc-box {
    max-width: 850px; /* Slightly wider for 3 columns */
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.itc-form {
    padding: 20px; 
    border: 1px solid #00bcd4; /* Teal Border */
    border-radius: 8px;
    background-color: #f7faff; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.itc-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00bcd4; 
    border-bottom: 2px solid #00bcd4;
    padding-bottom: 5px;
    margin-top: 5px;
    margin-bottom: 15px; 
}

/* Compact Grid for Inputs */
.itc-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; 
}

/* Define columns for different sections */
.itc-compact-grid.columns-2 .itc-input-group {
    width: 48%; /* Two per row */
}
.itc-compact-grid.columns-3 .itc-input-group {
    width: 31%; /* Three per row */
}

.itc-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.itc-input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem; /* Slightly smaller label text */
    margin-bottom: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.itc-input-group input, .itc-input-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Button Styles */
.itc-calculate-btn {
    display: block;
    width: 100%;
    padding: 10px; 
    margin-top: 20px; 
    background-color: #9c27b0; /* Purple Primary for action */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.itc-calculate-btn:hover {
    background-color: #7b1fa2;
}

/* Results Display */
.itc-results {
    margin-top: 25px; 
    padding: 20px;
    border: 2px solid #9c27b0; 
    border-radius: 8px;
    background-color: #f7eaff; 
    text-align: center;
}

.itc-results-title {
    color: #7b1fa2;
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.itc-data-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; 
    justify-content: center;
    margin-bottom: 15px;
}

.itc-data-segment {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px 10px;
    width: 48%; /* Two per row for breakdown */
    min-width: 150px;
}

/* Highlighted Segment: Refund/Owed */
.itc-data-segment.tax-refund-owed {
    width: 100%;
    border: 3px solid #9c27b0; /* Border will be changed by JS to green/red */
    background-color: #e0f2f1; /* Light base color */
    margin-bottom: 10px;
}
.itc-data-segment.tax-refund-owed .itc-data-value {
    color: #7b1fa2; 
    font-size: 2.5rem;
}


.itc-data-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #007bff; 
    line-height: 1.1;
}

.itc-data-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 850px) {
    .itc-compact-grid.columns-3 .itc-input-group {
        width: 48%; /* Collapse 3 columns to 2 on mid-sized devices */
    }
}
@media (max-width: 500px) {
    .itc-input-group, 
    .itc-data-segment {
        width: 100% !important; /* Stack everything on small screens */
    }
    .itc-input-group label {
        white-space: normal; /* Allow label wrapping on small screens */
    }
    .itc-data-segment.tax-refund-owed {
        margin-bottom: 5px;
    }
}