/* /Layout/MainLayout.razor.rz.scp.css */
/* =========================
   📦 LAYOUT BASE
   ========================= */

.page[b-m0vhz66dd3] {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main[b-m0vhz66dd3] {
    flex: 1;
}

/* =========================
   📚 SIDEBAR
   ========================= */

.sidebar[b-m0vhz66dd3] {
    background: linear-gradient(180deg,
            var(--sidebar-bg-start) 0%,
            var(--sidebar-bg-end) 70%);
    color: var(--color-text-white);
}

/* =========================
   🔝 TOP BAR
   ========================= */

.top-row[b-m0vhz66dd3] {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

/* Link style */
.top-row[b-m0vhz66dd3]  a,
.top-row[b-m0vhz66dd3]  .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--color-text-primary);
}

.top-row[b-m0vhz66dd3]  a:hover,
.top-row[b-m0vhz66dd3]  .btn-link:hover {
    text-decoration: underline;
}

/* truncate text */
.top-row[b-m0vhz66dd3]  a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   📱 RESPONSIVE
   ========================= */

@media (max-width: 640.98px) {
    .top-row[b-m0vhz66dd3] {
        justify-content: space-between;
    }

    .top-row[b-m0vhz66dd3]  a,
    .top-row[b-m0vhz66dd3]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-m0vhz66dd3] {
        flex-direction: row;
    }

    .sidebar[b-m0vhz66dd3] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-m0vhz66dd3] {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .top-row.auth[b-m0vhz66dd3]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-m0vhz66dd3],
    article[b-m0vhz66dd3] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

/* =========================
   💬 HEADER CHAT BUTTON
   ========================= */

[b-m0vhz66dd3] .shell-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1.5px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.2s ease;
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
}

[b-m0vhz66dd3] .shell-chat-btn:hover {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

[b-m0vhz66dd3] .shell-chat-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

[b-m0vhz66dd3] .shell-chat-btn:hover svg { transform: scale(1.1); }

/* Badge unread count */
[b-m0vhz66dd3] .shell-chat-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 1.5px solid #ffffff;
    animation: badge-pop-b-m0vhz66dd3 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[b-m0vhz66dd3] .shell-chat-btn:hover .shell-chat-badge {
    border-color: transparent;
}

@keyframes badge-pop-b-m0vhz66dd3 {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

@media (max-width: 640px) {
    .shell-chat-btn span:not(.shell-chat-badge)[b-m0vhz66dd3] { display: none; }
    .shell-chat-btn[b-m0vhz66dd3] {
        padding: 8px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
}
