/* ===========================================
    APR Calculator - Tool Specific Styles (Compact)
    =========================================== */

.apr-box {
    max-width: 700px; 
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.apr-form {
    padding: 15px; 
    border: 1px solid #ff5722; /* Deep Orange Border */
    border-radius: 6px;
    background-color: #fffaf0; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.apr-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff5722; 
    border-bottom: 2px solid #ff5722;
    padding-bottom: 3px; 
    margin-top: 15px; 
    margin-bottom: 10px; 
}

/* Compact Grid Setup */
.apr-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; 
}

.apr-compact-grid.columns-2 .apr-input-group {
    width: 48.5%; /* Two per row */
}

.apr-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; 
}

.apr-input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem; 
    margin-bottom: 2px;
}

.apr-input-group input, .apr-input-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Button Styles */
.apr-calculate-btn {
    display: block;
    width: 100%;
    padding: 10px; 
    margin-top: 15px; 
    background-color: #009688; /* Teal Primary for action */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apr-calculate-btn:hover {
    background-color: #00796b;
}

/* Results Display */
.apr-results {
    margin-top: 20px; 
    padding: 20px;
    border: 2px solid #009688; 
    border-radius: 6px;
    background-color: #e0f2f1; /* Light Teal Background */
    text-align: center;
}

.apr-results-title {
    color: #009688;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.apr-data-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; 
    justify-content: center;
    margin-bottom: 10px; 
}

.apr-data-segment {
    background: #ffffff;
    border-radius: 4px;
    padding: 15px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Highlighted Main Result (APR) */
.apr-data-segment.apr-result {
    width: 98%; /* Full width for main metric */
    border: 3px solid #ff5722; 
    background-color: #ffccbc; /* Light Orange */
    margin-bottom: 10px;
}

.apr-data-segment.apr-result .apr-data-value {
    font-size: 2.5rem;
    color: #d84315; 
}

.apr-data-segment.small-segment {
    width: 23%; /* Four per row for breakdowns */
    min-width: 150px;
}

.apr-data-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #333; 
    line-height: 1.1;
}

.apr-data-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .apr-data-segment.small-segment {
        width: 48.5%; /* Collapse four columns to two */
    }
}
@media (max-width: 550px) {
    .apr-compact-grid.columns-2 .apr-input-group,
    .apr-data-segment,
    .apr-data-segment.small-segment {
        width: 100% !important; /* Stack all inputs and results */
    }
}