/* 
 * Fix for modal positioning issue when page loads with scroll
 * Last Modified: 2025-01-10 15:30 AEST
 * Changes: Added fixed positioning and viewport centering for modal message
 */

/* Override modal message positioning to use fixed instead of absolute */
.DHMLmodalMessage,
#DHMLmodalMessage {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    z-index: 10000;
}

/* Ensure shadow/backdrop also uses fixed positioning */
.DHMLmodalMessage_contentDiv,
#DHMLmodalMessage_contentDiv {
    position: fixed !important;
}

/* Make sure backdrop covers viewport */
.DHTMLsuite_modalBox_overlay,
#DHTMLsuite_modalBox_overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .DHMLmodalMessage,
    #DHMLmodalMessage {
        max-width: 95vw;
        max-height: 95vh;
        padding: 15px;
    }
}

/* Style improvements for modal content */
.modal-close-btn {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.modal-close-btn:hover {
    background: #005a87;
    text-decoration: none;
    color: white;
}

.info-section, .warning-section, .help-section {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
    background: #f8f9fa;
}

.warning-section {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.help-section {
    background: #d1ecf1;
    border-left: 4px solid #0dcaf0;
}

.button-container {
    text-align: center;
    margin-top: 25px;
}
