/* ==========================================================================
   Superadmin – floating page help (? button + slide-in panel)
   ========================================================================== */

.sa-help-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--sa-accent, #c2185b);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.sa-help-fab:hover {
    background: var(--sa-accent-hover, #9f1449);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
}

.sa-help-fab:focus-visible {
    outline: 2px solid var(--sa-accent, #c2185b);
    outline-offset: 3px;
}

.sa-help-fab[aria-expanded="true"] {
    background: var(--sa-accent-hover, #9f1449);
}

.sa-help-panel {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.2s ease;
}

.sa-help-panel.is-open,
.sa-help-panel.is-closing {
    pointer-events: auto;
    visibility: visible;
}

.sa-help-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.sa-help-panel.is-open .sa-help-panel__backdrop {
    opacity: 1;
}

.sa-help-panel.is-closing .sa-help-panel__backdrop {
    opacity: 0;
}

.sa-help-panel__sheet {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(42rem, 100%);
    max-width: 100%;
    height: 100%;
    background: var(--sa-surface, #fff);
    border-radius: var(--sa-radius, 0.75rem) 0 0 var(--sa-radius, 0.75rem);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.sa-help-panel.is-open .sa-help-panel__sheet {
    transform: translateX(0);
}

.sa-help-panel.is-closing .sa-help-panel__sheet {
    transform: translateX(100%);
}

@media (min-width: 1100px) {
    .sa-help-panel__sheet {
        width: min(48rem, 52vw);
    }
}

.sa-help-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--sa-border, #e2e8f0);
}

.sa-help-panel__heading {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.sa-help-panel__kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sa-muted, #64748b);
}

.sa-help-panel__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--sa-text, #0f172a);
    line-height: 1.25;
}

.sa-help-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--sa-muted, #64748b);
    font-size: 1.1rem;
    cursor: pointer;
}

.sa-help-panel__close:hover {
    background: var(--sa-bg-hover, rgba(15, 23, 42, 0.06));
    color: var(--sa-text, #0f172a);
}

.sa-help-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.35rem 1.5rem 2.25rem;
    background: #f4f6f8;
    -webkit-overflow-scrolling: touch;
}

.sa-help-empty {
    margin: 0;
    padding: 1.5rem 0.25rem;
    color: var(--sa-muted, #64748b);
    font-size: 0.98rem;
    line-height: 1.5;
}

.sa-help-content {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    color: var(--sa-text, #0f172a);
    font-size: 0.95rem;
    line-height: 1.55;
}

.sa-help-content > :first-child {
    margin-top: 0;
}

#sa-help-panel .sa-help-lead {
    margin: 0 0 1.35rem;
    padding: 0;
    border: none !important;
    border-left: none !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

#sa-help-panel .sa-help-intro {
    margin: -0.65rem 0 1.35rem;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.55;
}

#sa-help-panel .sa-help-intro p {
    margin: 0 0 0.55rem;
}

#sa-help-panel .sa-help-intro p:last-child {
    margin-bottom: 0;
}

#sa-help-panel .sa-help-card {
    display: block;
    margin: 0;
    padding: 1.15rem 1.25rem 1.2rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: none;
}

#sa-help-panel .sa-help-card__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.65rem;
    padding: 0;
    border-bottom: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
}

#sa-help-panel .sa-help-card__title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--sa-accent, #c2185b);
    font-size: 0.95rem;
    flex-shrink: 0;
}

#sa-help-panel .sa-help-card > p {
    margin: 0 0 1.15rem;
    color: #64748b;
}

#sa-help-panel .sa-help-card > p:last-child {
    margin-bottom: 0;
}

#sa-help-panel .sa-help-points,
#sa-help-panel .sa-help-list {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    list-style: none;
    color: #64748b;
}

#sa-help-panel .sa-help-point {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#sa-help-panel .sa-help-point + .sa-help-point {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid #e8edf2;
}

#sa-help-panel .sa-help-point__text {
    margin: 0;
    line-height: 1.5;
}

#sa-help-panel .sa-help-sublist {
    margin: 0.45rem 0 0.55rem;
    padding: 0 0 0 1.15rem;
    list-style: disc;
    color: #64748b;
}

#sa-help-panel .sa-help-sublist li {
    margin: 0;
    padding: 0;
    display: list-item;
    line-height: 1.45;
}

#sa-help-panel .sa-help-sublist li + li {
    margin-top: 0.3rem;
}

#sa-help-panel .sa-help-point__text strong,
#sa-help-panel .sa-help-points strong,
#sa-help-panel .sa-help-list strong,
#sa-help-panel .sa-help-steps strong {
    color: #0f172a;
    font-weight: 650;
}

#sa-help-panel .sa-help-steps {
    margin: 0;
    padding: 0 0 0 1.2rem;
    color: #64748b;
    line-height: 1.5;
}

#sa-help-panel .sa-help-steps li + li {
    margin-top: 0.65rem;
}

#sa-help-panel .sa-help-point__media {
    margin: 0;
    padding: 0.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.65rem;
    background: #f8fafc;
    overflow: hidden;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Section screenshots: always block so images can span the full frame width. */
#sa-help-panel .sa-help-card__media {
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    overflow: hidden;
    min-height: 0;
    display: block;
}

#sa-help-panel .sa-help-point__media:empty::before,
#sa-help-panel .sa-help-card__media:empty::before {
    content: attr(data-help-img);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #94a3b8;
    text-align: center;
    padding: 0.75rem;
    width: 100%;
    display: block;
}

#sa-help-panel .sa-help-card__media:empty {
    padding: 0.5rem;
    border-style: dashed;
    border-color: #cbd5e1;
    background: #f8fafc;
    min-height: 5.5rem;
}

#sa-help-panel .sa-help-point__media:has(img) {
    border-style: solid;
    border-color: #e2e8f0;
    background: #fff;
    min-height: 0;
}

#sa-help-panel .sa-help-point__media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 7.5rem;
    object-fit: contain;
    object-position: left center;
}

#sa-help-panel .sa-help-point__media--lg img {
    max-height: 18.75rem; /* 7.5rem × 2.5 */
}

#sa-help-panel .sa-help-card__media img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
}

#sa-help-panel .sa-help-card__media--compact {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    background: #fff;
}

#sa-help-panel .sa-help-card__media--compact img {
    width: auto;
    max-width: 100%;
    max-height: 16rem;
    object-fit: contain;
    object-position: center top;
}

#sa-help-panel .sa-help-faq {
    margin: 0.15rem 0 0;
    display: grid;
    gap: 0.35rem;
}

#sa-help-panel .sa-help-faq details {
    border: 0;
    border-bottom: 1px solid #e8edf2;
    border-radius: 0;
    background: transparent;
    padding: 0.55rem 0;
}

#sa-help-panel .sa-help-faq details:last-child {
    border-bottom: 0;
}

#sa-help-panel .sa-help-faq summary {
    cursor: pointer;
    font-weight: 650;
    color: #0f172a;
    list-style: none;
}

#sa-help-panel .sa-help-faq summary::-webkit-details-marker {
    display: none;
}

#sa-help-panel .sa-help-faq summary::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

#sa-help-panel .sa-help-faq details[open] summary::before {
    transform: rotate(90deg);
}

#sa-help-panel .sa-help-faq details p {
    margin: 0.4rem 0 0.15rem 1.05rem;
    color: #64748b;
}

@media (max-width: 640px) {
    .sa-help-fab {
        right: 1rem;
        bottom: 1rem;
        width: 3rem;
        height: 3rem;
    }

    .sa-help-panel__sheet {
        width: 100%;
        border-radius: 0;
    }
}
