/* ===========================================
    Universal Finance Calculator - Tool Specific Styles (Compact)
    =========================================== */

/* Main Container and Form Reset */
.fc-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.fc-form {
    padding: 20px; 
    border: 1px solid #00c853; /* Bright Green Border */
    border-radius: 8px;
    background-color: #f7fffb; /* Very Light Green Background */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.fc-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00c853; 
    border-bottom: 2px solid #00c853;
    padding-bottom: 5px;
    margin-top: 5px;
    margin-bottom: 15px; 
}

/* Note on Solving */
.fc-note {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px dashed #ced4da;
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* Compact Grid for Inputs */
.fc-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; /* Tight gap between inputs */
}

.fc-input-group {
    display: flex;
    flex-direction: column;
    width: 31%; /* Three inputs per row on desktop */
    margin-bottom: 10px;
}

.fc-input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem; 
    margin-bottom: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.fc-input-group input, .fc-input-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Button Styles */
.fc-calculate-btn {
    display: block;
    width: 100%;
    padding: 10px; 
    margin-top: 20px; 
    background-color: #007bff; /* Secondary Blue for action */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fc-calculate-btn:hover {
    background-color: #0056b3;
}

/* Results Display */
.fc-results {
    margin-top: 25px; 
    padding: 20px;
    border: 2px solid #007bff; 
    border-radius: 8px;
    background-color: #eaf5ff; /* Light Blue background */
    text-align: center;
}

.fc-results-title {
    color: #0056b3;
    font-size: 1.6rem;
    margin-bottom: 15px;
}


.fc-data-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; 
    justify-content: center;
    margin-bottom: 15px;
}

.fc-data-segment {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px 10px;
    width: 30%; /* Three per row */
    min-width: 150px;
}

/* Specific styling for the SOLVED VALUE result */
.fc-data-segment.result-output {
    width: 100%;
    border: 3px solid #00c853; /* Primary Green border */
    background-color: #e0ffe8;
    margin-bottom: 10px;
}

.fc-data-segment.result-output .fc-data-value {
    color: #00c853; 
    font-size: 2.2rem;
}

.fc-data-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #007bff; 
    line-height: 1.1;
}

.fc-data-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    margin-top: 5px;
}

.fc-recalculate-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

/* Responsive adjustments for phones */
@media (max-width: 850px) {
    .fc-compact-grid {
        justify-content: space-around;
        gap: 8px;
    }
    .fc-input-group {
        width: 48%; /* Switch to two inputs per row on medium screens */
    }
    .fc-data-segment {
        width: 45%; 
    }
}

@media (max-width: 500px) {
     .fc-input-group, .fc-data-segment {
        width: 100%; /* One input/segment per row on small screens */
     }
     .fc-data-segment.result-output {
        margin-bottom: 5px;
    }
}