/* help.css */

.help-icon {
    cursor: pointer;
    display: inline-flex; /* Aligns icon better */
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    margin-left: 0.3em;
    border-radius: 50%;
    color: var(--background-color);
    font-weight: bold;
    font-size: 0.8em; /* Smaller icon */
    user-select: none; /* Prevent text selection */
    transition: background-color 0.2s ease;
}

.help-icon:hover {
    background-color: var(--primary-accent);
}

.help-modal {
    display: block; /* Initially shown */
    position: fixed;
    z-index: 1001; /* Above Leaflet controls (often 1000) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
    backdrop-filter: blur(3px); /* Optional blur effect */
    animation: fadeIn 0.3s ease; /* Fade in animation */
}

.help-modal-content {
    background-color: var(--card-bg) !important;
    color: var(--text-color);
    margin: 10% auto; /* Centered vertically */
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    width: 80%;
    max-width: 600px; /* Limit max width */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative; /* For close button positioning */
    animation: slideIn 0.3s ease; /* Slide in animation */
}

.help-modal-close {
    color: var(--subtext-color);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.help-modal-close:hover,
.help-modal-close:focus {
    color: var(--primary-accent);
    text-decoration: none;
}

.help-modal-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--header-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.help-modal-body p,
.help-modal-body ul,
.help-modal-body li {
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-color); /* Ensure body text color */
}
 .help-modal-body strong {
    color: var(--header-color); /* Make strong text stand out */
}

.help-modal-body ul {
    padding-left: 20px;
}

.help-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
}

.help-modal-body th,
.help-modal-body td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
}

.help-modal-body th {
    background-color: var(--background-color); /* Subtle header background */
    color: var(--header-color);
    font-weight: bold;
}

.help-modal-body tr:nth-child(even) {
    background-color: rgba(128, 128, 128, 0.05); /* Subtle striping */
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}