/* The Help panel (includes/help_panel.php, assets/js/help-panel.js), in the editor and on the public website. The
   guide text inside it uses the documentation styles (public-docs.css, .docs-body), a little smaller. */

.help-panel {
    /* Above the app windows (modal stack, 10020) so it can stay open beside them; below toasts (11000+). */
    z-index: 10100;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.45;
}

.help-panel [hidden] {
    display: none !important;
}

.hp-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 12px 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.hp-head-text {
    flex: 1;
    min-width: 0;
}

.hp-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-subtitle {
    margin: 1px 0 0;
    font-size: 12px;
    color: #64748b;
}

.hp-icon-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.hp-icon-btn:hover,
.hp-icon-btn:focus-visible {
    background: #f1f5f9;
    color: #475569;
}

.hp-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 20px;
    background: #f8fafc;
}

.hp-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #94a3b8;
    transition: border-color .15s, box-shadow .15s;
}

.hp-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px #eef2ff;
    color: #4f46e5;
}

.hp-search input {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: #1e293b;
}

.hp-search input::-webkit-search-cancel-button {
    display: none;
}

.hp-kbd {
    font: 500 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0 5px;
    color: #94a3b8;
}

.hp-clear {
    display: inline-flex;
    padding: 4px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
}

.hp-clear:hover {
    color: #475569;
    background: #f1f5f9;
}

.hp-group + .hp-group {
    margin-top: 18px;
}

.hp-group-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.hp-group-title a {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #4f46e5;
    text-decoration: none;
}

.hp-group-title a:hover {
    text-decoration: underline;
}

.hp-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.hp-list:empty {
    display: none;
}

.hp-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background-color .12s;
}

.hp-item:first-child {
    border-top: 0;
}

.hp-item:hover,
.hp-item:focus-visible {
    background: #f8fafc;
    outline: none;
}

.hp-item:focus-visible .hp-item-title {
    text-decoration: underline;
}

.hp-item-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #4f46e5;
}

.hp-item-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.hp-item-title {
    font-weight: 600;
    color: #1e293b;
}

.hp-item-detail {
    font-size: 12px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.hp-topic {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 10px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: #1e293b;
    cursor: pointer;
    transition: border-color .12s, background-color .12s;
    overflow-wrap: anywhere;
}

.hp-topic svg {
    color: #4f46e5;
}

.hp-topic:hover,
.hp-topic:focus-visible {
    border-color: #c7d2fe;
    background: #eef2ff;
    outline: none;
}

.hp-count {
    margin: 0 0 7px;
    font-size: 11.5px;
    color: #64748b;
}

.hp-empty {
    padding: 14px 12px;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.hp-empty p + p {
    margin-top: 4px;
    font-size: 12px;
}

.hp-ask {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s;
}

.hp-ask:hover,
.hp-ask:focus-visible {
    background: #e0e7ff;
    outline: none;
}

.hp-ask > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hp-ask small {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
}

.hp-ask svg {
    flex: 0 0 auto;
}

.hp-article {
    display: grid;
    gap: 8px;
}

.help-panel [data-hp-view="guide"] {
    margin: -14px -16px 0;
    padding: 16px 18px 4px;
    background: #ffffff;
    min-height: 100%;
}

.hp-guide-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.hp-guide-meta {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
}

.hp-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 2px 0 4px;
}

.hp-toc:empty {
    display: none;
}

.hp-toc a {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    text-decoration: none;
}

.hp-toc a:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
}

.help-panel .docs-body.hp-guide-body {
    font-size: 13.5px;
    line-height: 1.6;
}

.help-panel .docs-body.hp-guide-body h2 {
    font-size: 15.5px;
    margin-top: 1.6em;
    scroll-margin-top: 12px;
}

.help-panel .docs-body.hp-guide-body h3 {
    font-size: 14px;
}

.help-panel .docs-body.hp-guide-body > * + *,
.help-panel .docs-body.hp-guide-body li > * + *,
.help-panel .docs-body.hp-guide-body .docs-callout > * + * {
    margin-top: 0.85rem;
}

.help-panel .docs-body.hp-guide-body ol.docs-steps > li {
    min-height: 1.375rem;
    padding-left: 2.1rem;
}

.help-panel .docs-body.hp-guide-body ol.docs-steps > li + li {
    margin-top: 0.85rem;
}

.help-panel .docs-body.hp-guide-body ol.docs-steps > li::before {
    top: 0.05rem;
    width: 1.375rem;
    height: 1.375rem;
    font-size: 11.5px;
    line-height: 1.375rem;
}

.help-panel .docs-body.hp-guide-body .docs-callout {
    padding: 0.75rem 0.875rem 0.75rem 2.5rem;
    font-size: 13px;
}

.help-panel .docs-body.hp-guide-body .docs-callout::before {
    left: 0.875rem;
}

.help-panel .docs-body.hp-guide-body figure.docs-shot img {
    width: 100%;
    height: auto;
}

.hp-error {
    color: #b91c1c;
}

.hp-helpful {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    padding: 12px 0 14px;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
    color: #64748b;
}

.hp-helpful > span {
    margin-right: 2px;
}

.hp-thanks {
    flex-basis: 100%;
    margin: 4px 0 0;
    color: #15803d;
}

.hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .12s, background-color .12s;
}

.hp-chip:hover,
.hp-chip:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.hp-chip.is-chosen {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.hp-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px 11px 18px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 12px;
    color: #64748b;
}

.hp-foot-label {
    flex: 1;
    min-width: 0;
}

.hp-chip--whatsapp {
    color: #ffffff;
    background: #16a34a;
    border-color: #16a34a;
}

.hp-chip--whatsapp:hover,
.hp-chip--whatsapp:focus-visible {
    color: #ffffff;
    background: #15803d;
    border-color: #15803d;
}

.hp-chip--icon {
    width: 30px;
    justify-content: center;
    padding: 5px 0;
    color: #64748b;
}

@media (max-width: 480px) {
    .help-panel {
        width: 100%;
    }
}
