/* ===========================================
    Margin Calculator - Tool Specific Styles (Compact)
    =========================================== */

.mc-box {
    max-width: 750px; 
    margin: 0 auto;
    padding: 0; 
}

/* Form Styling */
.mc-form {
    padding: 15px; 
    border: 1px solid #388e3c; /* Deep Green Border */
    border-radius: 6px;
    background-color: #e8f5e9; /* Light Green Background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.mc-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1b5e20; 
    border-bottom: 2px solid #388e3c;
    padding-bottom: 3px; 
    margin-top: 15px; 
    margin-bottom: 10px; 
}
.input-instruction, .text-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: -5px;
    margin-bottom: 10px;
    display: block;
}

/* Compact Grid Setup (2 columns for financial inputs) */
.mc-compact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px; 
}

.mc-compact-grid .mc-input-group {
    width: 48.5%; /* Two per row */
}

.mc-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; 
}

.mc-input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem; 
    margin-bottom: 2px;
}

.mc-input-group input {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* Button Styles */
.mc-calculate-btn {
    display: block;
    width: 100%;
    padding: 12px; 
    margin-top: 15px; 
    background-color: #388e3c; /* Primary Green for action */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mc-calculate-btn:hover {
    background-color: #2e7d32;
}

/* Results Display */
.mc-results {
    margin-top: 20px; 
    padding: 20px;
    border: 2px solid #388e3c; 
    border-radius: 6px;
    background-color: #c8e6c9; /* Lighter Green Background */
    text-align: center;
}

.mc-results-title {
    color: #1b5e20;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Main Result Grid (Profit, Margin, Markup) */
.mc-data-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px; 
    margin-bottom: 20px; 
}

.mc-data-segment.total-result {
    flex-basis: 32%;
    background: #ffffff;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ced4da;
    transition: border 0.3s;
}

/* Highlight Margin and Profit */
.mc-data-segment.result-profit, .mc-data-segment.result-margin {
    border: 3px solid #388e3c;
}


.mc-data-segment .mc-data-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #388e3c; /* Color set by JS, but default to green */
    margin-top: 5px;
}

.mc-data-segment .mc-data-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}
.mc-data-segment .mc-data-subtext {
    font-size: 0.75rem;
    color: #90a4ae;
    margin-top: 5px;
}

/* Solved For Box */
.mc-solved-for-box {
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #ffc107; /* Yellow border for attention */
    margin-bottom: 20px;
    background-color: #fff8e1;
    text-align: left;
}
.mc-solved-text {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    margin: 0;
}
.mc-solved-text .highlight-solved {
    font-weight: 700;
    color: #e65100; /* Dark Orange for emphasis */
    font-size: 1.1rem;
}


.mc-recalculate-btn {
    padding: 8px 15px;
    margin-top: 15px;
    background-color: #795548; /* Brown secondary button */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mc-data-grid {
        flex-wrap: wrap;
        gap: 15px;
    }
    .mc-data-segment.total-result {
        flex-basis: 100%; /* Stack results on smaller screens */
    }
}
@media (max-width: 600px) {
    .mc-compact-grid .mc-input-group {
        flex-basis: 100%;
        width: 100% !important;
    }
}