/* ===========================================
    Mortgage Payoff Calculator - Tool Specific Styles (Compact)
    =========================================== */

.mpc-box {
    max-width: 700px; /* Optimal width for compact 2-column layout */
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.mpc-form {
    padding: 15px; /* Reduced padding for compact look */
    border: 1px solid #009688; /* Teal-Green Border */
    border-radius: 6px;
    background-color: #f8ffff; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.mpc-section-title {
    font-size: 1.1rem; /* Slightly smaller header */
    font-weight: 600;
    color: #009688; 
    border-bottom: 2px solid #009688;
    padding-bottom: 3px; /* Reduced vertical padding */
    margin-top: 15px; 
    margin-bottom: 10px; /* Reduced vertical margin */
}

/* Compact Grid for Inputs */
.mpc-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; /* Reduced gap for compactness */
}

.mpc-compact-grid.columns-2 .mpc-input-group,
.mpc-compact-grid.columns-2 .mpc-input-group-checkbox {
    width: 48.5%; /* Two per row */
}

.mpc-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; /* Minimized vertical spacing */
}

.mpc-input-group-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding-top: 10px;
}
.mpc-input-group-checkbox input {
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

.mpc-input-group label,
.mpc-input-group-checkbox label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem; 
    margin-bottom: 2px;
}

.mpc-input-group input, .mpc-input-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Button Styles */
.mpc-calculate-btn {
    display: block;
    width: 100%;
    padding: 10px; 
    margin-top: 15px; /* Reduced vertical spacing */
    background-color: #fbc02d; /* Amber Primary for action */
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mpc-calculate-btn:hover {
    background-color: #f9a825;
}

/* Results Display */
.mpc-results {
    margin-top: 20px; 
    padding: 20px;
    border: 2px solid #fbc02d; 
    border-radius: 6px;
    background-color: #fffde7; /* Light Yellow Background */
    text-align: center;
}

.mpc-results-title {
    color: #fbc02d;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.mpc-data-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; 
    justify-content: center;
    margin-bottom: 10px; 
}

.mpc-data-segment {
    background: #ffffff;
    border-radius: 4px;
    padding: 15px 10px;
    width: 31%; /* Three per row for main stats */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mpc-data-segment.large-data {
    width: 65%; /* Wider segment for primary result (Interest Saved) */
    background-color: #e0f2f1; /* Light Teal Background */
    border: 2px solid #009688;
}

.mpc-data-segment.small-segment {
    width: 48.5%; /* Two per row for secondary stats */
}

.mpc-data-segment.large-data .mpc-data-value {
    font-size: 2.2rem;
    color: #009688; /* Darker Teal for Savings */
}

.mpc-data-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333; 
    line-height: 1.1;
}

.mpc-data-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-top: 5px;
}


/* Responsive adjustments */
@media (max-width: 600px) {
    .mpc-compact-grid.columns-2 .mpc-input-group,
    .mpc-compact-grid.columns-2 .mpc-input-group-checkbox {
        width: 100%; /* Stack inputs on small screens */
    }
    .mpc-data-segment, 
    .mpc-data-segment.large-data,
    .mpc-data-segment.small-segment {
        width: 100% !important; /* Stack results */
    }
    .mpc-data-segment.large-data {
        order: -1; /* Move primary result to the top */
        margin-bottom: 10px;
    }
    .mpc-data-segment.large-data .mpc-data-value {
        font-size: 1.8rem;
    }
    .mpc-input-group-checkbox {
        justify-content: center;
    }
}