/* ============================================================================
           TOAST NOTIFICATIONS
           ============================================================================ */

#toast-container {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    min-width: 20rem;
    max-width: 40rem;
    padding: 1.2rem 1.6rem;
    background: #ffffff;
    border-radius: 0.8rem;
    box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
    opacity: 0;
    transform: translateX(-2rem);
    transition: all 0.3s ease;
    pointer-events: auto;
    border-left: 0.4rem solid #333;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.toast.success .toast-icon {
    color: #16a34a;
}

.toast.error {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.toast.error .toast-icon {
    color: #dc2626;
}

.toast.info {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.toast.info .toast-icon {
    color: #2563eb;
}

.toast.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

/* Responsive toast positioning */
@media (max-width: 639px) {
    #toast-container {
        top: 1rem;
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        max-width: 100%;
    }
}

/* ============================================================================
   LINKIFIED CONTENT - @mentions and #hashtags
   ============================================================================ */

.hashtag-link,
.mention-link {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.hashtag-link:hover,
.mention-link:hover {
    color: #5a4dd1;
    border-bottom-color: #6c5ce7;
}

.hashtag-link {
    /* Hashtags are slightly more subdued */
    opacity: 0.9;
}

.mention-link {
    /* Mentions are more prominent */
    font-weight: 600;
}

/* ============================================================================
           LAYOUT
           ============================================================================ */

#app {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ============================================================================
           LEFT COLUMN - 24rem, Dark Shade
           ============================================================================ */

.left-column {
    width: 24rem;
    background: #4e31ba;
    display: flex;
    flex-direction: column;
    color: #d4d4d4;
    position: relative;
}

.left-header {
    height: 7rem;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 0.0625rem solid #3e3e42;
    font-size: 1.8rem;
    font-weight: 600;
    background: #4428ae;
}

.logo {
    width: 9rem;
    height: 9rem;
    margin-left: -1.8rem;
    background: url('../img/expo-logo.png') no-repeat center;
    background-size: 75%;
    display: block;
}

.left-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.left-footer {
    height: 5rem;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-top: 0.0625rem solid #3e3e42;
    font-size: 1.4rem;
    background: #3b219b;
}

/* ============================================================================
           MIDDLE COLUMN - 40rem, Light Gray
           ============================================================================ */

.middle-column {
    width: 40rem;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.middle-header {
    height: 7rem;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 1.6rem;
    font-weight: 600;
    background: #ffffff;
}

.middle-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* ============================================================================
           RIGHT COLUMN - 64rem, White
           ============================================================================ */

.right-column {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.right-content {
    flex: 1;
    overflow-y: auto;
    padding: 3rem;
}

.right-footer {
    height: 5rem;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-top: 0.0625rem solid #e0e0e0;
}

/* ============================================================================
           CUSTOM SCROLLBARS
           ============================================================================ */

.left-content::-webkit-scrollbar,
.middle-content::-webkit-scrollbar,
.right-content::-webkit-scrollbar {
    width: 0.25rem;
}

.left-content::-webkit-scrollbar-track,
.middle-content::-webkit-scrollbar-track,
.right-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
}

.left-content::-webkit-scrollbar-thumb,
.middle-content::-webkit-scrollbar-thumb,
.right-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 0.4rem;
}

.left-content::-webkit-scrollbar-thumb:hover,
.middle-content::-webkit-scrollbar-thumb:hover,
.right-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
           RESPONSIVE BEHAVIOR
           ============================================================================ */

/* Mobile: Top bar + Bottom bar + Hamburger menu */
@media (max-width: 639px) {
    #app {
        flex-direction: column;
    }

    .left-column {
        width: 100%;
        height: auto;
        flex-direction: row;
    }

    .left-header {
        width: 100%;
        height: 6rem;
        border-right: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 2rem;
    }

    .left-content {
        position: fixed;
        top: 6rem;
        left: 0;
        width: 100%;
        height: calc(100vh - 11rem);
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 2rem;
        background-color: rgba(68, 40, 174, 0.95);
    }

    .left-content.open {
        transform: translateX(0);
    }

    .left-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 5rem;
        border-right: none;
        z-index: 1500;
    }

    .nav-item {
        padding: 1.2rem 1.5rem;
    }

    .middle-column {
        width: 100%;
        height: calc(100vh - 6rem - 5rem);
        overflow: hidden;
    }

    .middle-content {
        height: calc(100% - 7rem);
        overflow-y: auto;
    }

    .right-column {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 1000;
        display: none;
        box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.3);
        padding-bottom: 6rem;
    }

    .right-column.active {
        display: flex;
    }
}

/* Tablet: Right column as overlay */
@media (min-width: 640px) and (max-width: 1279px) {
    .right-column {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        z-index: 1000;
        display: none;
        box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.3);
    }

    .right-column.active {
        display: flex;
    }

    .middle-column {
        flex: 1;
    }

    .left-content {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
}

/* Desktop: Show all three */
@media (min-width: 1280px) {
    /* All columns visible */
}

/* ============================================================================
           DEMO CONTENT STYLING
           ============================================================================ */



.list-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #ffffff;
    border-radius: 0.8rem;
    border: 0.0625rem solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.list-item:hover {
    border-color: #007acc;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

.chat-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: 0.0625rem solid #e0e0e0;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    margin-right: 1rem;
}

.chat-button {
    padding: 1.2rem 2rem;
    background: #007acc;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    font-weight: 500;
}

.chat-button:hover {
    background: #005a9e;
}

.list-item-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.list-item-text {
    font-size: 1.3rem;
    color: #666;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.user-name {
    font-size: 1.4rem;
    font-weight: 500;
}

/* ============================================================================
           OVERLAY CONTROLS (Tablet)
           ============================================================================ */

.overlay-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: none;
    gap: 1rem;
    z-index: 10;
}

.control-btn {
    width: 4rem;
    height: 4rem;
    background: rgba(45, 45, 48, 0.9);
    color: #d4d4d4;
    border: 0.0625rem solid #3e3e42;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #3e3e42;
    transform: scale(1.05);
}

.control-btn.close-btn {
    background: rgba(244, 135, 113, 0.9);
    color: white;
}

.control-btn.close-btn:hover {
    background: #f48771;
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.control-btn:disabled:hover {
    background: rgba(45, 45, 48, 0.9);
    transform: none;
}

@media (max-width: 1279px) {
    .right-column .overlay-controls {
        display: flex;
    }
}

/* ============================================================================
           HAMBURGER MENU (Mobile)
           ============================================================================ */

.hamburger-btn {
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: none;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    width: 2.4rem;
    height: 0.3rem;
    background: #d4d4d4;
    transition: all 0.3s ease;
    border-radius: 0.2rem;
}

.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(0.6rem, 0.6rem);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(0.6rem, -0.6rem);
}

@media (max-width: 639px) {
    .hamburger-btn {
        display: flex;
    }
}

/* Menu overlay backdrop */
.menu-backdrop {
    display: none;
    position: fixed;
    top: 6rem;
    left: 0;
    width: 100%;
    height: calc(100vh - 13rem);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1900;
}

.menu-backdrop.open {
    display: block;
}

/* ============================================================================
   ROUTER LOADING STATE
   ============================================================================ */

/* Loading indicator - top progress bar */
body.router-loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0.3rem;
    background: linear-gradient(90deg, #4e31ba, #6b46d4, #4e31ba);
    background-size: 200% 100%;
    animation: routerLoading 1.5s ease-in-out infinite;
    z-index: 9999;
    transition: width 0.3s ease;
}

body.router-loading::before {
    width: 100%;
}

@keyframes routerLoading {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Optional: Add slight opacity to content during loading */
body.router-loading .middle-column,
body.router-loading .right-column {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.2s ease;
}