/* Public help center — login-style shell with sidebar layout */

html.caudex-font {
    font-size: 100%;
}

body.caudex-font,
body.caudex-font * {
    font-family: 'Caudex', serif !important;
}

html.eagle-font {
    font-size: 100%;
}

body.eagle-font,
body.eagle-font * {
    font-family: 'Eagle Lake', 'Caudex', serif !important;
}

body.eagle-font {
    font-size: 20px;
    line-height: 2;
}

body {
    margin: 0;
    padding: 24px 16px 80px;
    background-image: url('../images/back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Caudex', 'Cinzel', serif;
    font-size: 18px;
    font-weight: 600;
    color: #ece8e2;
}

a {
    cursor: pointer;
    color: #63b3ed;
}

button,
input,
textarea {
    font-family: inherit;
    font-weight: inherit;
}

button {
    cursor: pointer;
}

.home-link {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.32rem;
    font-weight: bold;
    z-index: 1000;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
}

.home-link:hover {
    color: #fff;
}

.help-wrap {
    z-index: 10;
    width: 95%;
    max-width: 1100px;
    min-width: 320px;
    margin: 0 auto;
    padding: 32px 36px 36px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 1);
    border-radius: 12px;
    background: linear-gradient(180deg, rgb(0 0 0) 0%, rgb(0 0 0 / 90%) 40%, rgb(0 0 0 / 50%) 100%);
}

.help-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.help-logo-link {
    display: block;
    width: 88px;
    flex: 0 0 auto;
    text-decoration: none;
    cursor: pointer;
}

.help-logo-link:focus-visible {
    outline: 2px solid rgba(233, 191, 149, 0.85);
    outline-offset: 4px;
    border-radius: 4px;
}

.help-logo {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.9;
}

.help-title {
    margin: 0;
    color: #fff;
    font-size: 28px;
    font-weight: normal;
    text-align: right;
    flex: 1 1 auto;
}

.help-search-row {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.help-search-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: inherit;
}

.help-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
    font-weight: inherit;
}

.help-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.14);
}

.help-search-input::selection {
    background: rgba(233, 191, 149, 0.85);
    color: #2b2418;
}

.help-search-input::-moz-selection {
    background: rgba(233, 191, 149, 0.85);
    color: #2b2418;
}

.help-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-right: 2px;
    cursor: pointer;
    opacity: 0.9;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23e9bf95' stroke-width='2.5' stroke-linecap='round' d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") no-repeat center / contain;
}

.help-search-input::-webkit-search-cancel-button:hover {
    opacity: 1;
}

.help-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.help-sidebar-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: min(62vh, 560px);
    min-height: min(62vh, 560px);
}

.help-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 191, 149, 0.55) rgba(0, 0, 0, 0.25);
}

.help-sidebar::-webkit-scrollbar,
.help-article-body::-webkit-scrollbar {
    width: 10px;
}

.help-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}

.help-sidebar::-webkit-scrollbar-thumb {
    background: rgba(233, 191, 149, 0.55);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.25);
}

.help-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 191, 149, 0.75);
}

.help-sidebar-loading,
.help-sidebar-empty,
.help-sidebar-error {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.help-sidebar-error {
    color: #e8b86d;
}

.help-category {
    margin-bottom: 20px;
}

.help-category-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(245, 233, 200, 0.85);
    letter-spacing: 0.02em;
}

.help-category.is-active-category .help-category-title {
    color: #f5e9c8;
}

.help-article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-article-link {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: #f5e9c8;
    font-size: 18px;
    line-height: 1.35;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.help-article-link:hover {
    background: rgba(139, 105, 20, 0.42);
    border-color: rgba(212, 160, 32, 0.55);
    color: #f5e9c8;
}

.help-article-link.is-active {
    border: 1px solid rgba(212, 160, 32, 0.22);
    background: rgba(139, 105, 20, 0.42);
    border-color: rgba(212, 160, 32, 0.55);
    color: #f5e9c8;
}

.help-article-panel {
    height: min(62vh, 560px);
    min-height: min(62vh, 560px);
    padding: 24px 28px;
    border-radius: 8px;
    background-color: #fff8e8;
    color: #2b2418;
    box-shadow: inset 0 0 0 1px rgba(43, 36, 24, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-article-panel ::selection {
    background: rgba(233, 191, 149, 0.85);
    color: #2b2418;
}

.help-article-panel ::-moz-selection {
    background: rgba(233, 191, 149, 0.85);
    color: #2b2418;
}

.help-article-header {
    flex: 0 0 auto;
    min-height: 48px;
}

.help-article-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.help-article-panel-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #2b2418;
    flex: 1 1 auto;
    min-width: 0;
}

.help-article-popout-btn[hidden],
.help-article-panel.is-placeholder .help-article-popout-btn {
    display: none !important;
}

.help-article-popout-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(43, 36, 24, 0.18);
    border-radius: 8px;
    background: rgba(43, 36, 24, 0.06);
    color: #4a4030;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.help-article-popout-btn:hover {
    background: rgba(43, 36, 24, 0.12);
    border-color: rgba(43, 36, 24, 0.28);
    color: #2b2418;
}

.help-article-popout-btn:focus-visible {
    outline: 2px solid rgba(180, 130, 55, 0.85);
    outline-offset: 2px;
}

.help-article-popout-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.help-article-panel-summary {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.5;
    color: #4a4030;
}

.help-article-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 130, 55, 0.9) rgba(74, 64, 48, 0.22);
}

.help-article-body::-webkit-scrollbar-track {
    background: rgba(74, 64, 48, 0.2);
    border-radius: 10px;
}

.help-article-body::-webkit-scrollbar-thumb {
    background: rgba(180, 130, 55, 0.88);
    border-radius: 10px;
    border: 2px solid rgba(74, 64, 48, 0.22);
}

.help-article-body::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 160, 32, 0.95);
}

.help-article-error,
.help-article-placeholder {
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
}

.help-article-error {
    color: #8b4513;
}

.help-article-content {
    font-size: 18px;
    line-height: 1.55;
}

.help-step-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.help-step-nav a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(43, 36, 24, 0.08);
    color: #4a4030;
    font-size: 18px;
    text-decoration: none;
}

.help-step-nav a:hover {
    background: rgba(43, 36, 24, 0.14);
}

.help-copyright {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: white;
    font-size: 18px;
    opacity: 0.7;
    z-index: 1000;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .help-wrap {
        padding: 24px 20px 28px;
    }

    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-sidebar-column {
        height: auto;
        min-height: 0;
    }

    .help-sidebar,
    .help-article-panel {
        height: auto;
        min-height: 280px;
    }

    .help-sidebar {
        max-height: none;
    }

    .help-article-panel {
        padding: 20px 18px;
    }
}

/* Embedded help dialog (portal support popup) */
.help-docs-dialog-backdrop {
    z-index: 12050;
}

.help-docs-dialog-backdrop:not([hidden]) {
    display: flex;
}

.help-docs-dialog-backdrop[hidden] {
    display: none !important;
}

.help-docs-dialog.reusable-popup {
    width: min(1100px, 96vw);
    max-width: min(1100px, 96vw);
    min-width: min(320px, 96vw);
    max-height: min(92vh, 900px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-docs-dialog {
    position: relative;
}

.help-docs-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 30;
}

.help-wrap.help-wrap-dialog {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 28px 32px 32px;
    box-shadow: none;
    border-radius: 0;
    max-height: min(92vh, 900px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.help-wrap.help-wrap-dialog .help-layout {
    min-width: 0;
}

@media (min-width: 900px) {
    .help-docs-dialog.reusable-popup {
        width: min(1100px, 94vw);
        max-width: 1100px;
    }
}

.help-wrap.help-wrap-dialog .help-logo-link {
    pointer-events: none;
    cursor: default;
}

.help-wrap.help-wrap-dialog .help-sidebar-column,
.help-wrap.help-wrap-dialog .help-article-panel {
    height: min(50vh, 460px);
    min-height: 260px;
}

.help-wrap.help-wrap-dialog .help-sidebar {
    height: auto;
}

@media (max-width: 768px) {
    .help-docs-dialog.reusable-popup {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        min-width: 0;
        max-height: 92vh;
    }

    .help-wrap.help-wrap-dialog {
        padding: 24px 18px 28px;
        padding-top: 44px;
    }

    .help-wrap.help-wrap-dialog .help-sidebar-column,
    .help-wrap.help-wrap-dialog .help-article-panel {
        height: auto;
        min-height: 240px;
    }
}
