/*
CHANGE LOG
File: /var/www/html/siteplanner.nsgia.com/static/css/help_panel.css
Purpose: Slide-out help panel on right side. Grouped topics with search filter.
Templates: base.html (via partials/_help_panel.html)
Version History:
  2026-02-23 v1.0 - Initial creation
*/

/* ===== HELP TOGGLE BUTTON (in navbar) ===== */
.help-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-left: 10px;
}
.help-toggle:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}
.help-toggle.active {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

/* ===== OVERLAY ===== */
.help-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1099;
}
.help-overlay.open { display: block; }

/* ===== PANEL ===== */
.help-panel {
    position: fixed;
    top: var(--sp-navbar-height, 48px);
    right: -400px;
    width: 380px;
    height: calc(100vh - var(--sp-navbar-height, 48px));
    background: #fff;
    z-index: 1100;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.help-panel.open {
    right: 0;
}

/* ===== PANEL HEADER ===== */
.help-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}
.help-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.help-header h3 {
    font-size: 15px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}
.help-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.help-close:hover { color: #333; }

/* ===== SEARCH ===== */
.help-search {
    width: 100%;
    padding: 8px 10px 8px 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 8px center;
    outline: none;
}
.help-search:focus {
    border-color: #3498db;
}

/* ===== SCROLLABLE CONTENT ===== */
.help-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* ===== GROUPS ===== */
.help-group {
    margin-bottom: 2px;
}
.help-group-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    padding: 10px 16px 4px;
    font-weight: 600;
}

/* ===== TOPICS ===== */
.help-topic {
    border-bottom: 1px solid #f0f0f0;
}
.help-topic.hidden {
    display: none;
}
.help-topic-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
    transition: background 0.1s;
}
.help-topic-title:hover {
    background: #f5f7fa;
}
.help-topic-arrow {
    font-size: 11px;
    color: #aaa;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.help-topic.expanded .help-topic-arrow {
    transform: rotate(90deg);
}
.help-topic-body {
    display: none;
    padding: 0 16px 12px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}
.help-topic.expanded .help-topic-body {
    display: block;
}

/* ===== EMPTY STATE ===== */
.help-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 13px;
}

/* ===== GROUP HIDDEN WHEN ALL CHILDREN HIDDEN ===== */
.help-group.hidden { display: none; }

/* ===== HIGHLIGHT ===== */
.help-highlight {
    background: #fff3cd;
    border-radius: 2px;
    padding: 0 1px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
    .help-panel {
        width: 100%;
        right: -100%;
    }
}
