/* ==========================================================================
   Mobile Off-canvas Navigation
   ========================================================================== */

#mobileNav {
    width: 85vw;
    max-width: 380px;
}

#mobileNav .offcanvas-header {
    padding: 0.75rem 1rem;
}

#mobileNav .offcanvas-body {
    overflow: hidden;
}

/* Slider container: flex row of panels */
.plu-oc-slider {
    display: flex;
    flex-direction: row;
    transition: transform 0.3s ease;
    height: 100%;
}

/* Each panel takes full width, doesn't shrink, scrolls independently */
.plu-oc-panel {
    min-width: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
}

/* Menu item */
.plu-oc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.15s ease;
}

.plu-oc-item:hover,
.plu-oc-item:focus {
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.plu-oc-item:active {
    background-color: #e9ecef;
}

/* Chevron arrow for sub-menu triggers */
.plu-oc-chevron {
    color: #adb5bd;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Divider between sections */
.plu-oc-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.25rem 0;
}

/* User header in main panel */
.plu-oc-user {
    padding: 1rem;
}

.plu-oc-user-info {
    display: flex;
    align-items: center;
}

.plu-oc-user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Back button at top of sub-panels */
.plu-oc-back {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #5bc0de;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.plu-oc-back:hover {
    background-color: #f8f9fa;
    color: #5bc0de;
    text-decoration: none;
}

/* Notification badge */
.plu-oc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    line-height: 1;
}

/* Flag images in nav items */
.plu-oc-item .plu-nav-flag {
    width: 24px;
}

/* Rounded photo helper */
.plu-rounded-photo-36px {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Danger text for logout */
.plu-oc-item.text-danger {
    color: #dc3545 !important;
}

.plu-oc-item.text-danger:hover {
    background-color: #fff5f5;
}

/* My Communities */

.plu-mycom-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.plu-mycom-chevron {
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 0.75rem;
    transition: transform 0.15s ease;
}

.plu-mycom-toggle[aria-expanded="true"] .plu-mycom-chevron {
    transform: rotate(180deg);
}

/* Desktop: the list scrolls on its own so the rest of the dropdown stays put */
.plu-mycom-panel {
    max-height: 320px;
    overflow-y: auto;
}

/* Mobile drills down to its own screen, so the panel scrolls with it */
.plu-mycom-panel-mobile {
    max-height: none;
    overflow-y: visible;
}

.plu-mycom-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.plu-mycom-panel .plu-mycom-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
}

.plu-mycom-panel-mobile .plu-mycom-link {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.plu-mycom-panel .plu-mycom-link:hover,
.plu-mycom-panel .plu-mycom-link:focus {
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.plu-mycom-panel .plu-mycom-current {
    background-color: #f1f9fc;
    font-weight: 600;
}

.plu-mycom-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.plu-mycom-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plu-mycom-host {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #6c757d;
}

.plu-mycom-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.25rem 1rem;
}

.plu-mycom-filter {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
}

.plu-mycom-panel-mobile .plu-mycom-filter {
    padding: 0.5rem 1rem;
}

/* 16px keeps iOS from zooming the page when the field takes focus */
.plu-mycom-filter-input {
    font-size: 1rem;
}

.plu-mycom-nomatch,
.plu-mycom-empty {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.plu-mycom-panel-mobile .plu-mycom-nomatch,
.plu-mycom-panel-mobile .plu-mycom-empty {
    padding: 0.75rem 1rem;
}

.plu-mycom-empty {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.plu-mycom-empty a {
    color: #1b7fa0;
    font-weight: 600;
    text-decoration: none;
}

.plu-mycom-empty a:hover {
    text-decoration: underline;
}
