/* css/modals.css */

/* Help Icon Button in Row Headers */
.row-header .help-icon {
    background-color: #4a4a4a;
    color: #bbb;
    border: 1px solid #3a3a3a;
    border-radius: 50%; 
    width: 20px;   
    height: 20px;
    padding: 0;
    font-size: 0.9em; 
    font-weight: bold;
    line-height: 18px; 
    text-align: center;
    cursor: pointer;
    margin-left: auto; 
    margin-right: 5px; 
    flex-shrink: 0; 
    transition: background-color 0.1s ease, color 0.1s ease, transform 0.1s ease;
}

.row-header .help-icon:hover {
    background-color: #5a5a5a;
    color: #fff;
}

.row-header .help-icon:active {
    background-color: #6a6a6a;
    transform: translateY(1px);
}

/* Help Modal Overlay */
#help-modal-overlay {
    position: fixed !important; /* Force position */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important; 
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.85) !important; /* More opaque */
    display: none; /* Start with display: none */
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important; /* Extremely high z-index */
    opacity: 0; /* Will transition opacity */
    visibility: hidden; /* Will transition visibility */
    /* Removed transition from here to apply on .visible */
}

#help-modal-overlay.visible {
    display: flex !important; /* Force display */
    opacity: 1 !important; 
    visibility: visible !important; 
    transition: opacity 0.15s ease-out !important; /* Faster transition */
}

/* Help Modal Content Box */
#help-modal-content {
    background-color: #333333 !important; /* Darker content bg */
    padding: 25px !important; 
    border-radius: 6px !important; 
    border: 1px solid #666666 !important; 
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7) !important; 
    width: 80vw !important; /* Relative to viewport */
    max-width: 700px !important; 
    height: 80vh !important; /* Relative to viewport */
    max-height: 90vh !important; 
    overflow-y: auto !important; 
    position: relative !important; 
    color: #e8e8e8 !important;
    transform: scale(0.9) !important;
    opacity: 0 !important;
    transition: transform 0.2s ease-out 0.05s, opacity 0.2s ease-out 0.05s !important;
}

#help-modal-overlay.visible #help-modal-content {
    transform: scale(1) !important; 
    opacity: 1 !important; 
}


#help-modal-close-button {
    position: absolute !important;
    top: 10px !important; 
    right: 15px !important;
    background: transparent !important;
    border: none !important;
    color: #bbbbbb !important;
    font-size: 2.2em !important; 
    font-weight: bold !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    z-index: 10; /* Ensure close button is above content */
}
#help-modal-close-button:hover {
    color: #ffffff !important;
}

#help-modal-title {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    color: #ffffff !important;
    font-size: 1.5em !important; 
    border-bottom: 1px solid #5f5f5f !important;
    padding-bottom: 12px !important;
}

#help-modal-body {
    font-size: 0.9em !important; 
    line-height: 1.7 !important;
}
#help-modal-body p { margin-bottom: 1em !important; }
#help-modal-body strong { color: #ffffff !important; }
#help-modal-body ul { padding-left: 20px !important; margin-bottom: 1em !important; }
#help-modal-body li { margin-bottom: 0.5em !important; }