/*
|--------------------------------------------------------------------------
| Primary Sidebar
|--------------------------------------------------------------------------
| Structure:
| 1. heading fixed
| 2. menu scrollable
| 3. weather fixed on home
|--------------------------------------------------------------------------
*/

.primary-sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.primary-sidebar-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;

    display: grid;
    grid-template-rows: 50px minmax(0, 1fr) auto;

    background: #eef4ff;
    border-radius: 8px;
    padding: 0;
    gap: 8px;
}

/*
|--------------------------------------------------------------------------
| Sidebar Heading
|--------------------------------------------------------------------------
*/

.primary-sidebar-heading {
    min-height: 0;
    overflow: hidden;
}

.sidebar-heading {
    position: relative;

    height: 50px;
    min-height: 50px;
    max-height: 50px;

    background: #0d4fa8;
    color: #fff;

    overflow: hidden;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
}

.sidebar-heading-back {
    position: absolute;
    left: 12px;
    top: 0;

    height: 50px;
    line-height: 50px;

    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;

    max-width: 34%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    z-index: 2;
}

.sidebar-heading-back:hover,
.sidebar-heading-back:focus {
    color: #fff !important;
    text-decoration: none !important;
}

.sidebar-heading-title {
    display: block !important;

    width: 100%;
    height: 50px;
    line-height: 50px !important;

    margin: 0 !important;
    padding: 0 82px !important;

    background: transparent !important;
    color: #fff !important;

    font-size: 16px;
    font-weight: 800;
    text-align: center;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.primary-sidebar h3.sidebar-heading-title {
    background: transparent !important;
}

/*
|--------------------------------------------------------------------------
| Sidebar Menu Area
|--------------------------------------------------------------------------
*/

.primary-sidebar-menu {
    min-height: 0;
    overflow: hidden;
    padding: 0 8px;
}

.primary-sidebar-menu-scroll {
    height: 100%;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 3px;
}

.sidebar-home-menu {
    margin: 0;
    padding: 0;
}

.sidebar-home-menu-item {
    margin-bottom: 8px;
}

/*
|--------------------------------------------------------------------------
| Menu Card
|--------------------------------------------------------------------------
*/

.sidebar-menu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    width: 100%;
    min-height: 58px;

    padding: 10px 12px;

    background: #ffffff;
    border: 1px solid rgba(34, 67, 182, 0.12);
    border-radius: 14px;

    color: #1f2d3d;
    text-decoration: none !important;

    box-shadow: 0 3px 10px rgba(15, 35, 95, 0.08);

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease;
}

.sidebar-menu-card:hover,
.sidebar-menu-card:focus {
    background: #f8fbff;
    border-color: rgba(34, 67, 182, 0.35);
    box-shadow: 0 6px 16px rgba(15, 35, 95, 0.16);

    color: #2243B6;
    transform: translateX(3px);
    text-decoration: none !important;
}

.sidebar-menu-card:active {
    transform: translateX(1px) scale(0.99);
}

.sidebar-menu-leading {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    flex: 1 1 auto;
}

/*
|--------------------------------------------------------------------------
| Menu Icon
|--------------------------------------------------------------------------
| Fixes:
| - exact centering
| - hover does not cover icon
| - old .fa rules cannot shift icon
|--------------------------------------------------------------------------
*/

.sidebar-menu-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border-radius: 12px;
    background: rgba(34, 67, 182, 0.1);
    color: #2243B6;

    font-size: 17px;
    line-height: 1;

    overflow: hidden;
    position: relative;
}

.sidebar-menu-icon i,
.sidebar-menu-icon .fa,
.sidebar-menu-icon .menu-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 17px !important;
    line-height: 1 !important;
    text-align: center !important;

    position: static !important;
}

.sidebar-menu-card:hover .sidebar-menu-icon,
.sidebar-menu-card:focus .sidebar-menu-icon {
    background: rgba(34, 67, 182, 0.15);
    color: #2243B6;
}

/*
|--------------------------------------------------------------------------
| Menu Text
|--------------------------------------------------------------------------
*/

.sidebar-menu-title {
    display: block;

    min-width: 0;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-menu-content {
    min-width: 0;
    display: block;
}

.sidebar-menu-subtitle {
    display: block;

    margin-top: 3px;

    color: #6b7280;
    font-size: 12px;
    line-height: 1.25;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/*
|--------------------------------------------------------------------------
| Menu Trailing: ID + Arrow
|--------------------------------------------------------------------------
*/

.sidebar-menu-trailing {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    flex: 0 0 auto;
}

.sidebar-menu-id {
    min-width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #169b62;
    color: #ffffff;

    font-size: 16px;
    font-weight: 900;
    line-height: 1;

    box-shadow: 0 3px 8px rgba(22, 155, 98, 0.24);
}

.sidebar-menu-arrow {
    color: #94a3b8;
    font-size: 20px;

    transition:
        transform 160ms ease,
        color 160ms ease;
}

.sidebar-menu-card:hover .sidebar-menu-id,
.sidebar-menu-card:focus .sidebar-menu-id {
    background: #128557;
}

.sidebar-menu-card:hover .sidebar-menu-arrow,
.sidebar-menu-card:focus .sidebar-menu-arrow {
    color: #169b62;
    transform: translateX(2px);
}

/*
|--------------------------------------------------------------------------
| Service/Sub Menu
|--------------------------------------------------------------------------
*/

.sidebar-service-menu {
    margin: 0;
    padding: 0;
}

.sidebar-service-menu-item {
    margin-bottom: 8px;
}

.sidebar-service-menu-item:last-child {
    margin-bottom: 0;
}

.sidebar-submenu-card {
    min-height: 66px;
}

.sidebar-submenu-card .sidebar-menu-title {
    font-size: 14px;
}

.sidebar-submenu-card .sidebar-menu-subtitle {
    font-size: 11px;
}

/*
|--------------------------------------------------------------------------
| Weather Section
|--------------------------------------------------------------------------
*/

.primary-sidebar-weather {
    min-height: 0;
    overflow: visible;
    padding: 0 8px 8px;
}

/*
|--------------------------------------------------------------------------
| Weather Card
|--------------------------------------------------------------------------
*/

.sidebar-weather-card {
    width: 100%;

    background: linear-gradient(135deg, #1f567c 0%, #2243B6 100%);
    color: #ffffff;

    margin: 0;
    padding: 10px;

    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 35, 95, 0.22);

    overflow: hidden;
}

.sidebar-weather-card * {
    box-sizing: border-box;
}

.sidebar-weather-card h1,
.sidebar-weather-card h2,
.sidebar-weather-card h3,
.sidebar-weather-card h4,
.sidebar-weather-card p {
    color: #ffffff !important;
    margin: 0 !important;
}

/*
|--------------------------------------------------------------------------
| Weather Top
|--------------------------------------------------------------------------
*/

.sidebar-weather-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    margin-bottom: 7px;
}

.sidebar-weather-location {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 5px;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-weather-location i {
    flex: 0 0 auto;
}

.sidebar-weather-date {
    flex: 0 0 auto;

    max-width: 46%;

    padding: 3px 7px;

    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);

    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/*
|--------------------------------------------------------------------------
| Weather Body
|--------------------------------------------------------------------------
*/

.sidebar-weather-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 4px 0 6px;
}

.sidebar-weather-icon-wrap {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 42px;

    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);

    overflow: hidden;
}

.sidebar-weather-icon {
    width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;

    display: block !important;
    object-fit: contain;

    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.sidebar-weather-icon[src=""],
.sidebar-weather-icon:not([src]) {
    display: none !important;
}

.sidebar-weather-icon[src=""] + .sidebar-weather-fallback-icon,
.sidebar-weather-icon:not([src]) + .sidebar-weather-fallback-icon {
    display: inline-flex !important;
}

.sidebar-weather-fallback-icon {
    display: none !important;
    color: #ffffff;
    font-size: 22px;
}

.sidebar-weather-info {
    min-width: 0;
    text-align: left;
}

.sidebar-weather-temp {
    display: block !important;

    font-size: 24px !important;
    font-weight: 900;
    line-height: 1 !important;
}

.sidebar-weather-temp sup {
    font-size: 12px;
    top: -0.4em;
}

.sidebar-weather-text {
    display: block !important;

    margin-top: 3px !important;

    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.2 !important;
    text-transform: capitalize;

    opacity: 0.95;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/*
|--------------------------------------------------------------------------
| Weather Times
|--------------------------------------------------------------------------
*/

.sidebar-weather-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;

    margin-top: 4px;
}

.sidebar-weather-time-item {
    min-width: 0;

    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon label"
        "icon time";
    column-gap: 5px;
    row-gap: 1px;

    padding: 5px 6px;

    border-radius: 11px;
    background: rgba(255, 255, 255, 0.14);

    overflow: hidden;
}

.sidebar-weather-time-item i {
    grid-area: icon;
    align-self: center;

    font-size: 12px;
}

.sidebar-weather-time-item span {
    grid-area: label;

    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-weather-time-item strong {
    grid-area: time;

    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/*
|--------------------------------------------------------------------------
| Weather Small Height Safety
|--------------------------------------------------------------------------
*/

@media (max-height: 760px) {
    .sidebar-weather-card {
        padding: 8px;
        border-radius: 14px;
    }

    .sidebar-weather-top {
        margin-bottom: 5px;
    }

    .sidebar-weather-location {
        font-size: 11px;
    }

    .sidebar-weather-date {
        font-size: 9px;
    }

    .sidebar-weather-body {
        gap: 8px;
        padding: 3px 0 5px;
    }

    .sidebar-weather-icon-wrap {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .sidebar-weather-icon {
        width: 36px !important;
        max-width: 36px !important;
        height: 36px !important;
    }

    .sidebar-weather-temp {
        font-size: 21px !important;
    }

    .sidebar-weather-text {
        font-size: 11px !important;
    }

    .sidebar-weather-time-item {
        padding: 4px 5px;
    }

    .sidebar-weather-time-item span {
        font-size: 8px;
    }

    .sidebar-weather-time-item strong {
        font-size: 9px;
    }
}

/*
|--------------------------------------------------------------------------
| Office Hint
|--------------------------------------------------------------------------
*/

.sidebar-office-hint {
    margin-top: 30% !important;
    padding: 15px;

    color: #2243B6;
    background: #ffffff;

    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(15, 35, 95, 0.08);
}

/*
|--------------------------------------------------------------------------
| Scrollbar
|--------------------------------------------------------------------------
| Scroll is still enabled, but scrollbar is hidden.
|--------------------------------------------------------------------------
*/

.primary-sidebar-menu-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.primary-sidebar-menu-scroll::-webkit-scrollbar {
    display: none;
}

.primary-sidebar-auto-scroll {
    -webkit-overflow-scrolling: touch;
}

/*
|--------------------------------------------------------------------------
| Small Height Safety
|--------------------------------------------------------------------------
| Helps kiosk displays where sidebar height is tight.
|--------------------------------------------------------------------------
*/

@media (max-height: 760px) {
    .primary-sidebar-shell {
        grid-template-rows: 46px minmax(0, 1fr) auto;
        padding: 6px;
        gap: 6px;
    }

    .sidebar-heading {
        height: 46px;
        min-height: 46px;
        max-height: 46px;
    }

    .sidebar-heading-back {
        height: 46px;
        line-height: 46px;
        font-size: 13px;
    }

    .sidebar-heading-title {
        height: 46px;
        line-height: 46px !important;
        font-size: 15px;
    }

    .sidebar-menu-card {
        min-height: 52px;
        padding: 8px 10px;
    }

    .sidebar-menu-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        max-width: 34px;
        flex-basis: 34px;
    }

    .sidebar-menu-icon i,
    .sidebar-menu-icon .fa,
    .sidebar-menu-icon .menu-icon {
        font-size: 15px !important;
    }

    .sidebar-menu-title {
        font-size: 14px;
    }

    .sidebar-menu-id {
        min-width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .sidebar-weather-card {
        padding: 7px;
        border-radius: 14px;
    }

    .sidebar-weather-location {
        font-size: 11px;
    }

    .sidebar-weather-date-block {
        font-size: 9px;
    }

    .sidebar-weather-icon {
        width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        flex-basis: 34px;
    }

    .sidebar-weather-temp {
        font-size: 20px !important;
    }

    .sidebar-weather-text {
        font-size: 11px !important;
    }

    .sidebar-weather-footer span {
        font-size: 9px;
        padding: 3px 4px;
    }
}