/* ===================== HELP WIDGET ===================== */

/* Botão flutuante "?" - canto inferior esquerdo */
#help-widget {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--pageTitlebackground, #2569b1);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: rgb(0, 0, 0) 0px 0px 10px;
    z-index: 2000;
    user-select: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

#help-widget:hover {
    transform: scale(1.08);
    background-color: #1c5590;
}

/* Janela de ajuda */
#help-box {
    position: fixed;
    left: 80px;
    bottom: 20px;
    width: 340px;
    max-height: 70vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: rgb(0, 0, 0) 0px 0px 12px;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

#help-box.hidden {
    display: none;
}

#help-box.dragging {
    opacity: 0.92;
    cursor: grabbing;
    user-select: none;
}

/* Cabeçalho - também é a pega para arrastar */
.help-header {
    background-color: var(--pageTitlebackground, #2569b1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: grab;
    flex-shrink: 0;
}

.help-header:active {
    cursor: grabbing;
}

.help-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: bold;
    user-select: none;
}

.help-header button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

.help-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Corpo com scroll próprio */
.help-content {
    padding: 12px 14px;
    overflow-y: auto;
}

.help-intro {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #444;
}

/* Acordeão */
#help-box details {
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

#help-box details[open] {
    border-color: var(--pageTitlebackground, #2569b1);
}

#help-box summary {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    background-color: #f4f4f4;
    list-style: none;
    user-select: none;
}

#help-box summary::-webkit-details-marker {
    display: none;
}

#help-box summary:hover {
    background-color: #e9e9e9;
}

#help-box .details-body {
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

#help-box .details-body p {
    margin: 0 0 8px 0;
}

#help-box .details-body ul,
#help-box .details-body ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
}

/* Scrollbar discreto */
.help-content::-webkit-scrollbar {
    width: 6px;
}

.help-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}