/**
 * Calculate Margin Calculator Styles
 */

/* General Calculator Styling */
.cmc-calculator-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cmc-calculator-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.cmc-calculator-form {
    margin-bottom: 20px;
}

.cmc-form-group {
    margin-bottom: 15px;
}

.cmc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.cmc-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

.cmc-calculate-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s;
}

.cmc-calculate-btn:hover {
    background-color: #45a049;
}

/* Results Styling */
.cmc-calculator-result {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cmc-result-details {
    display: grid;
    grid-gap: 10px;
}

.cmc-result-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cmc-result-item:last-child {
    border-bottom: none;
}

.cmc-label {
    font-weight: 600;
    color: #555;
}

.cmc-value {
    font-weight: 700;
    color: #333;
}

/* Error Message */
.cmc-error {
    color: #d32f2f;
    font-weight: 600;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cmc-calculator-wrapper {
        padding: 15px;
    }
    
    .cmc-calculator-title {
        font-size: 20px;
    }
    
    .cmc-form-group input {
        padding: 8px;
    }
    
    .cmc-calculate-btn {
        padding: 10px;
    }
}

/* Advanced Calculator Specific Styles */
.advanced-calculator .cmc-form-group {
    position: relative;
}

.basic-calculator input,
.advanced-calculator input {
    transition: border-color 0.3s;
}

.basic-calculator input:focus,
.advanced-calculator input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

/* Specific colors for results */
.cmc-result-item:nth-child(1) .cmc-value {
    color: #0277bd; /* Blue for Total Cost */
}

.cmc-result-item:nth-child(2) .cmc-value {
    color: #00838f; /* Teal for Net Revenue */
}

.cmc-result-item:nth-child(3) .cmc-value {
    color: #2e7d32; /* Green for Profit */
}

.cmc-result-item:nth-child(4) .cmc-value {
    color: #1565c0; /* Dark Blue for Margin */
}

.cmc-result-item:nth-child(5) .cmc-value {
    color: #4527a0; /* Purple for Markup */
}

.cmc-result-item:nth-child(6) .cmc-value {
    color: #c62828; /* Red for ROI */
}

/* Input placeholder styling */
.cmc-calculator-form input::placeholder {
    color: #aaa;
    opacity: 0.7;
}

/* Button states */
.cmc-calculate-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
}

.cmc-calculate-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Animation for results */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cmc-calculator-result:not(:empty) {
    animation: fadeIn 0.3s ease-out;
}