@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* ===================================================================
   BASE & FONT STYLES (SHARED BY ALL TOOLS)
   =================================================================== */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    /* Use min-height to vertically center content within the iframe */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh; 
    color: #333;
}

/* ===================================================================
   TOOL CONTAINER STYLES (Merge all specific container classes)
   =================================================================== */
.calculator-container {
    /* Style for the Calorie Calculator (which uses flex for two columns) */
    display: flex;
    gap: 40px;
    max-width: 900px; /* Wider than the others */
    width: 100%;
    flex-wrap: wrap;
    margin: 40px auto;
}

.bmi-container, 
.water-container, 
.macro-container, 
.heart-rate-container {
    /* Styles for the single-column calculators */
    max-width: 500px;
    width: 90%;
    margin: 40px auto;
    background: #f7f7f7;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ===================================================================
   TYPOGRAPHY AND HEADER STYLES
   =================================================================== */
.calculator h2, 
.bmi-container h2, 
.water-container h2, 
.macro-container h2, 
.heart-rate-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
    color: #32cd32; /* Yo-Mart Green */
}

/* Specific Calorie Calculator header styles (for the right panel) */
.result-pane h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #32cd32;
}

/* ===================================================================
   FORM ELEMENT STYLES
   =================================================================== */
input, select {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0 20px; /* Increased bottom margin for better spacing */
    border-radius: 10px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 16px;
    box-sizing: border-box;
}

/* Fix for Calorie Calculator's tighter input spacing */
.calculator-container input, .calculator-container select {
    margin: 10px 0; /* Keep original spacing for multi-column layout */
}


/* ===================================================================
   BUTTON STYLES
   =================================================================== */
button {
    padding: 12px 20px;
    width: 100%;
    border: none;
    border-radius: 12px;
    background-color: #32cd32;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #28a428;
}

/* ===================================================================
   RESULT BOX STYLES
   =================================================================== */
.result-box, .result-pane p {
    margin-top: 30px;
    padding: 20px;
    border-radius: 15px;
    background: #e6ffe6;
    text-align: center;
    border: 1px solid #c8e6c9;
}
.result-pane p {
    margin-top: 0; /* Reset margin for results list items */
    text-align: left;
    margin-bottom: 15px;
}

.highlight {
    font-weight: 700;
    color: #228B22;
    font-size: 24px;
    display: block;
    margin-top: 5px;
}

.unit {
    font-size: 16px;
    font-weight: 400;
}

/* ===================================================================
   CALORIE CALCULATOR SPECIFIC LAYOUT (Left and Right Panels)
   =================================================================== */
.calculator, .result-pane {
    background: #f7f7f7;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
}

/* Media Query for Mobile (Calorie Calculator) */
@media (max-width: 800px) {
    .calculator-container {
        flex-direction: column;
    }
}