/* =====================================================
   Extensions Help Hub — public /help chrome
   Mirrors Wissensportal header / product-switcher patterns
   ===================================================== */

:root {
    --helphub-blue: #2a5fa3;
    --helphub-blue-dark: #1e4a82;
    --helphub-hover-bg: #e6effd;
    --helphub-border: #e5e5e5;
    --helphub-header-height: 65px;
}

.helphub-layout {
    min-height: 100vh;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
}

/* ── Header ─────────────────────────────────────────── */

.helphub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--helphub-header-height);
    padding: 8px 24px;
    background: #fff;
    border-bottom: 1px solid var(--helphub-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.helphub-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}

.helphub-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.helphub-logo {
    height: 36px;
    width: auto;
    display: block;
}

.helphub-portal-name {
    font-size: 24px;
    margin-top: 5px;
    font-weight: 600;
    color: var(--helphub-blue);
    white-space: nowrap;
}

.helphub-header-centre {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.helphub-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.helphub-language-select {
    min-width: 140px;
    height: 36px;
    border: 1px solid var(--helphub-border);
    border-radius: 4px;
    padding: 0 10px;
    background: #fff;
    color: #222;
    font-size: 14px;
}

.helphub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.helphub-btn-primary {
    background: var(--helphub-blue);
    color: #fff;
}

.helphub-btn-primary:hover {
    background: var(--helphub-blue-dark);
    color: #fff;
    text-decoration: none;
}

.helphub-btn-secondary {
    background: #fff;
    color: var(--helphub-blue);
    border-color: var(--helphub-blue);
}

.helphub-btn-secondary:hover {
    background: var(--helphub-hover-bg);
}

/* ── Module switcher ────────────────────────────────── */

.helphub-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--helphub-blue);
    user-select: none;
    font-family: inherit;
}

.helphub-switcher-trigger:hover {
    background: var(--helphub-hover-bg);
    border-color: var(--helphub-blue);
}

.helphub-switcher-chevron {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.helphub-switcher-chevron-open {
    transform: rotate(180deg);
}

.helphub-switcher-overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: transparent;
}

.helphub-switcher-panel {
    position: fixed;
    top: var(--helphub-header-height);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 2px solid var(--helphub-blue);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 20px 32px;
}

.helphub-switcher-products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.helphub-switcher-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border: 1px solid var(--helphub-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.helphub-switcher-item:hover {
    background: var(--helphub-hover-bg);
    border-color: var(--helphub-blue);
    box-shadow: 0 2px 8px rgba(42, 95, 163, 0.15);
}

.helphub-switcher-item-active {
    border: 2px solid var(--helphub-blue);
    box-shadow: 0 0 0 1px rgba(42, 95, 163, 0.15);
}

.helphub-switcher-item-icon {
    font-size: 28px;
    color: var(--helphub-blue);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helphub-switcher-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

/* ── Landing ────────────────────────────────────────── */

.helphub-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.helphub-intro {
    margin: 0 0 28px;
    font-size: 16px;
    color: #445;
    max-width: 720px;
}

.helphub-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.helphub-module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px 20px;
    background: #fff;
    border: 1px solid var(--helphub-blue);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.15s, background 0.15s;
}

.helphub-module-card:hover {
    background: var(--helphub-hover-bg);
    box-shadow: 0 4px 14px rgba(42, 95, 163, 0.15);
}

.helphub-module-card-icon {
    font-size: 36px;
    color: var(--helphub-blue);
}

.helphub-module-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.helphub-module-card-footer {
    margin-top: 8px;
}

/* ── Guide page chrome ──────────────────────────────── */

.helphub-guide-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.helphub-guide-shell .ids-help-page {
    flex: 1;
    background: #fff;
}

.helphub-guide-shell a.ids-help-nav-back {
    text-decoration: none;
    box-sizing: border-box;
}

/* ── Support drawer ─────────────────────────────────── */

.helphub-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 300;
}

.helphub-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    background: #fff;
    z-index: 301;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.helphub-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--helphub-border);
}

.helphub-drawer-title {
    margin: 0;
    font-size: 18px;
    color: var(--helphub-blue);
}

.helphub-drawer-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.helphub-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.helphub-drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--helphub-border);
}

.helphub-form-group {
    margin-bottom: 16px;
}

.helphub-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.helphub-form-control {
    width: 100%;
    border: 1px solid var(--helphub-border);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.helphub-form-control:disabled {
    background: #f3f3f3;
}

.helphub-validation {
    margin-top: 4px;
    font-size: 12px;
    color: #b00020;
}

.helphub-alert {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.helphub-alert-success {
    background: #e8f5e9;
    color: #1b5e20;
}

.helphub-alert-danger {
    background: #fdecea;
    color: #b00020;
}

@media (max-width: 768px) {
    .helphub-header {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .helphub-header-centre {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .helphub-portal-name {
        font-size: 14px;
    }

    .helphub-header-right {
        gap: 6px;
    }

    .helphub-btn span {
        display: none;
    }

    .helphub-switcher-panel {
        padding: 16px;
    }

    .helphub-switcher-item {
        min-width: 100px;
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .helphub-switcher-products {
        flex-direction: column;
    }

    .helphub-switcher-item {
        flex-direction: row;
        width: 100%;
        min-width: unset;
        text-align: left;
    }
}
