/* Shared Help Modal Styles */

/* Page Help Button */
.page-help-button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-help-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.page-help-button i {
    font-size: 1rem;
}

/* Help Modal */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000; /* Higher than navbar (10000) */
}

.help-modal.active {
    display: block;
}

.help-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.help-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.help-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.help-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.help-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    margin-bottom: 2rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section p {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-section ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.help-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.25rem;
}

.help-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.help-section li strong {
    color: var(--text-primary);
}

/* Help Footer */
.help-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-subtle);
}

.help-modal-footer h5 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.help-footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.help-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.help-footer-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .help-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .help-modal-header {
        padding: 1rem;
    }
    
    .help-modal-body {
        padding: 1rem;
    }
    
    .help-modal-footer {
        padding: 1rem;
    }
    
    .help-footer-links {
        flex-direction: column;
    }
    
    .help-footer-link {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
.help-modal.show {
    display: block;
}

.help-modal.show .help-modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}