
/* =============================================
   Shell: what surrounds every signed-in page --
   the sidebar (installer_base.html), the phone
   top bar that opens it, and the footer. Brand
   green in both themes.
   ============================================= */

/* =============================================
   Installer Portal Sidebar Navigation
   ============================================= */

/* Collapsed to an icon rail by default; expanding overlays the page rather
   than reflowing it, so the content offset stays at the rail width. */
.installer-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 76px;
    z-index: 1100;
    background-color: var(--fe-dark-green-1);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
}

.installer-sidebar.is-open {
    width: 264px;
}

.installer-with-sidebar {
    margin-left: 76px;
}

/* .page-wrapper is a column flex container, so its children default to
   min-width: auto and refuse to shrink below their content — which pushes
   wide pages out from under the docked sidebar. Bootstrap's auto side
   margins then shrink-wrap them instead, so pin the width as well. */
.page-wrapper.installer-with-sidebar > * {
    min-width: 0;
    width: 100%;
}

.installer-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1090;
    display: none;
    background-color: rgba(0, 0, 0, 0.45);
}

.installer-sidebar-overlay.is-open {
    display: block;
}

body.installer-nav-open {
    overflow: hidden;
}

/* Reserve the scrollbar gutter so locking page scroll behind the expanded
   menu does not shift the content sideways. */
body {
    scrollbar-gutter: stable;
}

/* ===== Brand ===== */
.installer-sidebar-brand {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.installer-sidebar.is-open .installer-sidebar-brand {
    justify-content: flex-start;
    padding: 20px 20px 18px;
}

/* Collapsed, the box crops the wordmark down to the circular mark.
   The brand is the expand/collapse control, so it is a button, not a link. */
.installer-sidebar-brand-link {
    display: block;
    position: relative;
    overflow: hidden;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.installer-sidebar-brand-link:hover {
    opacity: 0.8;
}

.installer-sidebar-brand-link:focus {
    outline: none;
}

.installer-sidebar-brand-link:focus-visible {
    outline: 2px solid var(--fe-primary-gold);
    outline-offset: 2px;
}

.installer-sidebar-logo {
    display: block;
    position: absolute;
    left: -3px;
    top: -2px;
    width: 216px;
    height: 45px;
    max-width: none;
}

.installer-sidebar.is-open .installer-sidebar-brand-link {
    width: 204px;
    height: 42px;
}

.installer-sidebar.is-open .installer-sidebar-logo {
    position: static;
    width: 204px;
    height: 42px;
}

/* ===== Identity ===== */
.installer-sidebar-identity {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    height: 56px;
    box-sizing: border-box;
    padding: 0 18px;
    background-color: rgba(0, 0, 0, 0.16);
}

.installer-sidebar.is-open .installer-sidebar-identity {
    justify-content: flex-start;
    padding: 0 20px;
}

.installer-sidebar-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.18);
    font-family: 'Titillium Web', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.installer-sidebar-identity-text {
    display: none;
    min-width: 0;
}

.installer-sidebar.is-open .installer-sidebar-identity-text {
    display: block;
}

.installer-sidebar-company,
.installer-sidebar-welcome {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.installer-sidebar-company {
    font-family: 'Titillium Web', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
}

.installer-sidebar-welcome {
    margin-top: 3px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.72);
}

/* ===== Nav ===== */
.installer-sidebar-nav {
    flex: 1 0 auto;
    padding-top: 18px;
}

.installer-sidebar-section {
    display: none;
    padding: 0 22px;
    margin-bottom: 8px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.installer-sidebar.is-open .installer-sidebar-section {
    display: block;
}

.installer-sidebar-divider {
    height: 1px;
    margin: 12px 18px;
    background-color: rgba(255, 255, 255, 0.14);
}

.installer-sidebar.is-open .installer-sidebar-divider {
    margin: 16px 22px 15px;
}

.installer-sidebar-link,
.installer-rail-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 11px 3px 11px 0;
    border: 0;
    border-left: 3px solid transparent;
    background: none;
    font-family: 'Titillium Web', sans-serif;
    font-size: 15px;
    text-align: left;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.installer-sidebar.is-open .installer-sidebar-link,
.installer-sidebar.is-open .installer-rail-toggle {
    justify-content: flex-start;
    padding: 11px 22px 11px 19px;
}

.installer-sidebar-link:hover,
.installer-sidebar-link:focus,
.installer-rail-toggle:hover,
.installer-rail-toggle:focus {
    background-color: rgba(255, 255, 255, 0.11);
    color: #fff;
    text-decoration: none;
}

.installer-rail-toggle {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}

.installer-rail-toggle:focus {
    outline: none;
}

.installer-rail-toggle .fa {
    transition: transform 0.25s ease;
}

.installer-sidebar.is-open .installer-rail-toggle .fa {
    transform: rotate(180deg);
}

.installer-sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.13);
    border-left-color: var(--fe-primary-gold);
    font-weight: 600;
    color: #fff;
}

.installer-sidebar-link .fa,
.installer-rail-toggle .fa {
    flex-shrink: 0;
    width: 19px;
    font-size: 16px;
    text-align: center;
}

.installer-sidebar-label {
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.installer-sidebar.is-open .installer-sidebar-label {
    display: block;
}

/* Collapsed, each item names itself on hover. */
.installer-sidebar-link::after,
.installer-rail-toggle::after {
    content: attr(aria-label);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    padding: 7px 12px;
    border-radius: 4px;
    background-color: #0c3a3e;
    font-size: 13.5px;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.installer-sidebar-link:hover::after,
.installer-sidebar-link:focus::after,
.installer-rail-toggle:hover::after,
.installer-rail-toggle:focus::after {
    opacity: 1;
}

.installer-sidebar.is-open .installer-sidebar-link::after,
.installer-sidebar.is-open .installer-rail-toggle::after {
    content: none;
}

.installer-sidebar-footer {
    flex-shrink: 0;
    padding: 10px 0 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.installer-sidebar-footer .installer-sidebar-link {
    color: rgba(255, 255, 255, 0.8);
}

/* Dark mode switch: a gold moon while on, and a switch beside the label
   when the sidebar is open */
.installer-theme-toggle {
    cursor: pointer;
}

.installer-theme-toggle:focus {
    outline: none;
}

.installer-theme-toggle:focus-visible {
    outline: 2px solid var(--fe-primary-gold);
    outline-offset: -2px;
}

.installer-theme-toggle[aria-checked="true"] .fa {
    color: var(--fe-primary-gold);
}

.installer-theme-toggle__track {
    display: none;
    position: relative;
    flex: none;
    width: 30px;
    height: 17px;
    margin-left: auto;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.24);
    transition: background-color 0.2s ease;
}

.installer-theme-toggle__track::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #fff;
    transition: transform 0.2s ease;
}

.installer-sidebar.is-open .installer-theme-toggle__track {
    display: block;
}

.installer-theme-toggle[aria-checked="true"] .installer-theme-toggle__track {
    background-color: var(--fe-primary-gold);
}

.installer-theme-toggle[aria-checked="true"] .installer-theme-toggle__track::before {
    transform: translateX(13px);
}

/* Mobile top bar — hidden while the sidebar is docked */
.installer-topbar {
    display: none;
}

.installer-nav-toggle .bar {
    display: block;
}

/* ===== Sidebar as an off-canvas drawer ===== */
@media (max-width: 991.98px) {
    .installer-topbar {
        position: sticky;
        top: 0;
        z-index: 1150;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 56px;
        padding: 0 12px;
        background-color: var(--fe-dark-green-1);
    }

    .installer-topbar-brand {
        display: block;
        transition: opacity 0.3s ease;
    }

    .installer-topbar-brand:hover {
        opacity: 0.8;
    }

    .installer-topbar-brand img {
        display: block;
        height: 34px;
        width: auto;
    }

    .installer-nav-toggle {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: none;
        border: 0;
    }

    .installer-nav-toggle:focus {
        outline: none;
    }

    .installer-sidebar,
    .installer-sidebar.is-open {
        top: 56px;
        width: 292px;
        max-width: 85vw;
        overflow-y: auto;
    }

    .installer-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.3);
    }

    .installer-sidebar.is-open {
        transform: translateX(0);
    }

    .installer-sidebar-brand,
    .installer-rail-toggle {
        display: none;
    }

    .installer-sidebar-link {
        min-height: 50px;
        padding: 13px 20px 13px 17px;
        font-size: 16px;
    }

    .installer-sidebar-overlay {
        top: 56px;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .installer-with-sidebar {
        margin-left: 0;
    }
}

/* =============================================
   Installer Portal Footer — Option B
   ============================================= */



.installer-footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.installer-footer-support {
    display: flex;
    align-items: center;
    gap: 20px;
}

.installer-footer-support-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12.5px;
}

.installer-footer-support-item i {
    color: #8a9bb0;
    font-size: 12px;
}

.installer-footer-support-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.installer-footer-support-item a:hover {
    color: #fff;
}

.installer-footer-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.12);
}

.installer-footer-return {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.installer-footer-return:hover {
    color: #fff;
    text-decoration: none;
}


.installer-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
}

.installer-footer-copyright {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11.5px;
}

.installer-footer-legal {
    display: flex;
    gap: 18px;
}

.installer-footer-legal a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 11.5px;
    transition: color 0.2s;
}

.installer-footer-legal a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .installer-footer-main {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 20px;
    }

    .installer-footer-support {
        flex-direction: column;
        gap: 8px;
    }

    .installer-footer-divider {
        display: none;
    }

    .installer-footer-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px 20px;
    }
}

/* =============================================
   Installer Portal Footer
   ============================================= */

.installer-footer {
    background-color: var(--in-page);
    border-top: 1px solid var(--in-border-soft);
    color: var(--in-text);
}

.installer-footer .installer-footer-main {
    border-bottom: 1px solid var(--in-border-soft);
}

.installer-footer .installer-footer-support-item,
.installer-footer .installer-footer-support-item a {
    color: var(--in-text-muted);
}

.installer-footer .installer-footer-support-item a:hover {
    color: var(--in-accent);
}

.installer-footer .installer-footer-support-item i {
    color: var(--in-text-faint);
}

.installer-footer .installer-footer-divider {
    background: var(--in-border);
}

.installer-footer .installer-footer-return {
    color: var(--in-accent);
    font-weight: 600;
}

.installer-footer .installer-footer-return:hover {
    color: var(--fe-primary-green);
}

.installer-footer .installer-footer-copyright,
.installer-footer .installer-footer-legal a {
    color: var(--in-text-faint);
}

.installer-footer .installer-footer-legal a:hover {
    color: var(--in-accent);
}

/* Unread dot, on the Help Center icon and the mobile menu button: a new
   release note or, for staff, support tickets waiting on a reply */
.release-notes-unread-dot {
    position: absolute;
    top: calc(50% - 12px);
    left: calc(50% + 5px);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--fe-primary-gold);
    box-shadow: 0 0 0 2px var(--fe-dark-green-1);
    pointer-events: none;
}

.installer-sidebar.is-open .release-notes-unread-dot {
    left: 36px;
}

.installer-nav-toggle {
    position: relative;
}

.installer-nav-toggle .release-notes-unread-dot {
    top: 8px;
    left: auto;
    right: 6px;
}
