/* Accessibility Improvements */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.mhplc-input-group input:focus-visible,
.mhplc-input-group select:focus-visible,
.mhplc-button:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Fieldset styling */
fieldset {
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    padding: 0 10px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Focus styles for interactive elements */
.mhplc-button:focus,
.mhplc-input-group input:focus,
.mhplc-input-group select:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Tooltip focus accessibility */
.mhplc-tooltip:focus-within .mhplc-tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Money label color fix */
.money-label {
    color: #000000;
}

/* Input group styling */
.mhplc-input-group {
    margin-bottom: 15px;
}

.mhplc-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #000000;
}

/* Button styling */
.mhplc-button {
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Calculate Button - Blue with white text */
#mhplc-calculateBtn {
    background-color: #3498db; /* Blue */
    color: white;
    border: 1px solid #2980b9;
}

#mhplc-calculateBtn:hover {
    background-color: #2980b9; /* Darker blue on hover */
}

/* Reset Button - Orange with black text */
#mhplc-resetBtn {
    background-color: #f39c12; /* Orange */
    color: #000000; /* Black text */
    border: 1px solid #e67e22;
}

#mhplc-resetBtn:hover {
    background-color: #e67e22; /* Darker orange on hover */
}

/* Button focus states */
.mhplc-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Results styling */
.mhplc-output-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mhplc-output-label {
    font-weight: 600;
}

.mhplc-output-value {
    font-weight: bold;
}

/* Error styling */
.mhplc-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.mhplc-input-error {
    border-color: #e74c3c !important;
}

/* Tooltip styling */
.mhplc-tooltip {
    position: relative;
    display: inline-block;
}

.mhplc-tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    font-weight: normal;
}

.mhplc-tooltip:hover .mhplc-tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mhplc-calculator-container {
        flex-direction: column;
    }
    
    .mhplc-input-section,
    .mhplc-output-section {
        width: 100%;
    }
}