/* ===========================================
    Rent vs Buy Calculator - Tool Specific Styles (Compact)
    =========================================== */

.rvb-box {
    max-width: 800px; 
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.rvb-form {
    padding: 15px; 
    border: 1px solid #3f51b5; /* Blue Border */
    border-radius: 6px;
    background-color: #f7f9ff; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rvb-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3f51b5; 
    border-bottom: 2px solid #3f51b5;
    padding-bottom: 3px; 
    margin-top: 15px; 
    margin-bottom: 10px; 
}

/* Compact Grid Setup (2 Columns) */
.rvb-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; 
}

.rvb-compact-grid.columns-2 .rvb-input-group {
    width: 48.5%; /* Two per row */
}

.rvb-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; 
}

.rvb-input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem; 
    margin-bottom: 2px;
}

.rvb-input-group input, .rvb-input-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Advanced Assumptions Toggle */
.rvb-toggle-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #e0e7ff; 
    color: #3f51b5;
    border: 1px solid #c5cae9;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.rvb-toggle-btn:hover {
    background-color: #c5cae9;
}
.rvb-advanced-inputs {
    padding: 10px 0;
    border: 1px dashed #c5cae9;
    border-radius: 4px;
    margin-bottom: 10px;
}
.rvb-advanced-inputs .rvb-compact-grid {
    padding: 0 10px;
}

/* Button Styles */
.rvb-calculate-btn {
    display: block;
    width: 100%;
    padding: 12px; 
    margin-top: 15px; 
    background-color: #00bcd4; /* Cyan Primary for action */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rvb-calculate-btn:hover {
    background-color: #00acc1;
}

/* Results Display */
.rvb-results {
    margin-top: 20px; 
    padding: 20px;
    border: 2px solid #00bcd4; 
    border-radius: 6px;
    background-color: #e0f7fa; /* Light Cyan Background */
    text-align: center;
}

.rvb-results-title {
    color: #3f51b5;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.rvb-data-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px; 
    margin-bottom: 20px; 
}

.rvb-data-segment.total-result {
    flex-basis: 48%; /* Two main result blocks */
    background: #ffffff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ced4da;
    transition: border 0.3s;
}

.rvb-data-segment.total-result .rvb-data-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a237e; 
    margin-top: 5px;
}

.rvb-data-segment .rvb-data-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

/* Comparison Box */
.rvb-comparison-box {
    background-color: #fffde7;
    border: 1px solid #ffeb3b;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.rvb-comparison-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.rvb-comparison-difference {
    font-size: 1.1rem;
    margin: 5px 0 0 0;
}

/* Breakdown Details */
.rvb-breakdown-details {
    text-align: left;
    margin-bottom: 20px;
}

.rvb-breakdown-details h4 {
    border-bottom: 1px dashed #00bcd4;
    padding-bottom: 5px;
    color: #3f51b5;
    font-size: 1.1rem;
}

.rvb-breakdown-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rvb-breakdown-details ul li {
    padding: 3px 0;
    border-bottom: 1px dotted #e0e0e0;
    font-size: 0.95rem;
}

.rvb-breakdown-grid {
    display: flex;
    gap: 20px;
}
.rvb-breakdown-grid > div {
    flex: 1;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .rvb-data-grid,
    .rvb-breakdown-grid {
        flex-direction: column;
    }
    .rvb-data-segment.total-result {
        flex-basis: 100%;
    }
}
@media (max-width: 550px) {
    .rvb-compact-grid.columns-2 .rvb-input-group {
        width: 100% !important; /* Stack all inputs */
    }
}