/* Calculator Styles */

td {
    padding: 5px !important;
}

.mpe-calculator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: inherit;
}

.mpe-calculator-lg {
    max-width: 1200px !important;
}

.mpe-calculator form {
    display: grid;
    gap: 15px;
}

.mpe-calculator label {
    font-weight: bold;
}

.mpe-calculator input[type="number"],
.mpe-calculator input[type="text"],
.mpe-calculator select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mpe-calculator select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; /* Ensures padding doesn’t increase width */
}

.mpe-calculator input[type="submit"] {
    background-color: #D4AF37;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.mpe-calculator input[type="submit"]:hover {
    background-color: #967916;
}

.mpe-results {
    margin-top: 30px;
}

.mpe-results h2 {
    color: #333;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 10px;
}

.mpe-results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.mpe-results th,
.mpe-results td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.mpe-results th {
    background-color: #D4AF37;
    color: white;
}

.mpe-results tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mpe-calculator {
        padding: 15px;
    }

    .mpe-calculator input[type="number"],
    .mpe-calculator input[type="text"],
    .mpe-calculator select {
        font-size: 14px;
    }

    .mpe-calculator input[type="submit"] {
        font-size: 14px;
        padding: 8px 16px;
    }

    .mpe-results h2 {
        font-size: 18px;
    }

    .mpe-results table {
        width: 100%;
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
    }

    .mpe-results th,
    .mpe-results td {
        padding: 8px;
        font-size: 14px;
    }
}

/* Reset Button Styling */
#reset-calculator.button {
    background-color: #D4AF37; /* Red color to signify reset */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect for Reset Button */
#reset-calculator.button:hover {
    background-color: #D4AF37; /* Darker red for hover */
    transform: scale(1.05); /* Slightly enlarge the button on hover */
}

/* Focus effect for Reset Button */
#reset-calculator.button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); /* Red focus outline */
}

.mpe-results {
    overflow-x: auto; /* Allow horizontal scrolling if table overflows */
    max-width: 100%; /* Ensure the table does not overflow beyond the parent container */
}

table {
    width: 100%; /* Ensure the table takes up full width of the parent container */
}

th, td {
    word-wrap: break-word; /* Ensure long words break and don't cause overflow */
}

/* Mobile/tablet landscape responsiveness */
@media (max-width: 480px) {
    .mpe-calculator {
        padding: 10px;
        max-width: 100%;
    }

    .mpe-calculator input[type="number"],
    .mpe-calculator input[type="text"],
    .mpe-calculator select {
        font-size: 12px;
    }

    .mpe-calculator input[type="submit"] {
        font-size: 12px;
        padding: 6px 14px;
    }

    .mpe-results h2 {
        font-size: 16px;
    }

    .mpe-results table {
        font-size: 12px;
    }
}
