/* _content/BlazorChat/Components/Layout/MainLayout.razor.rz.scp.css */
#blazor-error-ui[b-hvyv4d70sy] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-hvyv4d70sy] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* _content/BlazorChat/Components/Pages/Home.razor.rz.scp.css */


.app-container[b-3bdtku9n2v] {
    display: grid;
    grid-template-areas: "sidebar main";
    grid-template-columns: 320px 1fr;
    height: 100vh; /* Fallback */
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

/* Sidebar */
.sidebar[b-3bdtku9n2v] {
    grid-area: sidebar;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.sidebar-title-row[b-3bdtku9n2v] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-close-btn[b-3bdtku9n2v], .mobile-menu-btn[b-3bdtku9n2v] {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-header[b-3bdtku9n2v] {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.logo[b-3bdtku9n2v] {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-input[b-3bdtku9n2v] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus[b-3bdtku9n2v] {
    border-color: var(--accent);
}

.btn-primary[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled)[b-3bdtku9n2v] {
    background: var(--accent-hover);
}

.btn-primary:disabled[b-3bdtku9n2v] {
    opacity: 0.5;
    cursor: not-allowed;
}

.session-list[b-3bdtku9n2v] {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Required for CSS grid 1fr to shrink properly */
    padding: 0.5rem;
    padding-bottom: 8rem; /* Extra space so the last item's dropdown menu doesn't trigger scrollbars */
}

.session-item[b-3bdtku9n2v] {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.session-item:hover[b-3bdtku9n2v], .session-item.active[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.05);
}

.session-info[b-3bdtku9n2v] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.session-title[b-3bdtku9n2v] {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-date[b-3bdtku9n2v] {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.session-actions[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn[b-3bdtku9n2v] {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    opacity: 0.5;
}

.session-item:hover .action-btn[b-3bdtku9n2v], .action-btn.favorited[b-3bdtku9n2v] {
    opacity: 1;
}

.action-btn:hover[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.1);
}

.session-menu-wrapper[b-3bdtku9n2v] {
    position: relative;
}

.session-menu[b-3bdtku9n2v] {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    overflow: hidden;
}

.session-menu button[b-3bdtku9n2v] {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
}

.session-menu button:hover[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.1);
}

.session-menu button.delete-btn:hover[b-3bdtku9n2v] {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.edit-title-input[b-3bdtku9n2v] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent);
    color: white;
    border-radius: 4px;
    padding: 0.25rem;
    font-size: 1rem;
    outline: none;
    width: 100%;
}

/* Main Content */
.main-content[b-3bdtku9n2v] {
    grid-area: main;
    display: grid;
    grid-template-areas: 
        "header"
        "chat"
        "footer";
    grid-template-rows: auto 1fr auto;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.chat-header[b-3bdtku9n2v] {
    grid-area: header;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.header-controls[b-3bdtku9n2v] {
    display: flex;
    gap: 1rem;
    flex: 1;
    max-width: 600px;
}

.glass-input[b-3bdtku9n2v] {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    outline: none;
    transition: all 0.2s;
}

.glass-input:focus[b-3bdtku9n2v] {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.glass-input:disabled[b-3bdtku9n2v] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Dropdown */
.custom-dropdown[b-3bdtku9n2v] {
    position: relative;
    width: 250px;
}

.dropdown-trigger[b-3bdtku9n2v] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.dropdown-trigger .truncate[b-3bdtku9n2v] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu[b-3bdtku9n2v] {
    position: absolute;
    top: 100%;
    left: 0;
    width: 350px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.dropdown-search[b-3bdtku9n2v] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    outline: none;
}

.dropdown-items[b-3bdtku9n2v] {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dropdown-item[b-3bdtku9n2v] {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item:hover[b-3bdtku9n2v], .dropdown-item.selected[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item .model-name[b-3bdtku9n2v] {
    font-weight: 500;
}

.dropdown-item .model-meta[b-3bdtku9n2v] {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.system-prompt-input[b-3bdtku9n2v] {
    flex: 1;
}

.header-actions[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-badge[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    gap: 0.5rem;
}

.stats-label[b-3bdtku9n2v] { color: var(--text-secondary); }
.stats-value[b-3bdtku9n2v] { font-family: monospace; font-weight: 600; color: #10b981; }

.btn-icon[b-3bdtku9n2v] {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-icon:hover[b-3bdtku9n2v], .btn-icon.active[b-3bdtku9n2v] {
    opacity: 1;
}

/* Messages */
.messages-container[b-3bdtku9n2v] {
    grid-area: chat;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.messages-scroll[b-3bdtku9n2v] {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message-wrapper[b-3bdtku9n2v] {
    display: flex;
    width: 100%;
}

.message-wrapper.user[b-3bdtku9n2v] { justify-content: flex-end; }
.message-wrapper.assistant[b-3bdtku9n2v] { justify-content: flex-start; }

.message-bubble[b-3bdtku9n2v] {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    line-height: 1.5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user .message-bubble[b-3bdtku9n2v] {
    background: var(--bubble-user);
    border-bottom-right-radius: 4px;
}

.assistant .message-bubble[b-3bdtku9n2v] {
    background: var(--bubble-assistant);
    border-bottom-left-radius: 4px;
}

.message-content[b-3bdtku9n2v] {
    word-break: break-word;
}



.message-meta[b-3bdtku9n2v] {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

/* Typing Indicator */
.typing-indicator[b-3bdtku9n2v] {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-indicator span[b-3bdtku9n2v] {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: bounce-b-3bdtku9n2v 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1)[b-3bdtku9n2v] { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2)[b-3bdtku9n2v] { animation-delay: -0.16s; }

@keyframes bounce-b-3bdtku9n2v {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Footer Input */
.chat-footer[b-3bdtku9n2v] {
    grid-area: footer;
    padding: 1.5rem 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.input-area[b-3bdtku9n2v] {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.message-textarea[b-3bdtku9n2v] {
    flex: 1;
    resize: none;
    padding: 1rem;
    padding-right: 3rem;
}

.send-btn[b-3bdtku9n2v] {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
}

/* Utils */
.alert[b-3bdtku9n2v] {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: #fca5a5;
}

.empty-state[b-3bdtku9n2v] {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state-content h2[b-3bdtku9n2v] { margin-bottom: 0.5rem; }
.empty-state-content p[b-3bdtku9n2v] { color: var(--text-secondary); margin-bottom: 1.5rem; }

/* Responsive Mobile Layout */
@media (max-width: 768px) {
    .app-container[b-3bdtku9n2v] {
        grid-template-areas: "main";
        grid-template-columns: 1fr;
    }
    
    .sidebar[b-3bdtku9n2v] {
        position: absolute;
        height: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.open[b-3bdtku9n2v] {
        transform: translateX(0);
        box-shadow: 10px 0 20px rgba(0,0,0,0.5);
    }
    
    .mobile-close-btn[b-3bdtku9n2v], .mobile-menu-btn[b-3bdtku9n2v] {
        display: block;
    }
    
    .mobile-menu-btn[b-3bdtku9n2v] {
        margin-right: 1rem;
    }

    .chat-header[b-3bdtku9n2v] {
        padding: 0.75rem 1rem;
    }
    
    .header-controls[b-3bdtku9n2v] {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .custom-dropdown[b-3bdtku9n2v], .dropdown-menu[b-3bdtku9n2v] {
        width: 100%;
    }
    
    .stats-badge[b-3bdtku9n2v] {
        display: none; /* Hide stats on mobile header to save space */
    }
    
    .messages-container[b-3bdtku9n2v] {
        padding: 1rem;
    }
    
    .chat-footer[b-3bdtku9n2v] {
        padding: 1rem;
    }
}

/* Settings Modal */
.modal-overlay[b-3bdtku9n2v] {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content[b-3bdtku9n2v] {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header[b-3bdtku9n2v] {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2[b-3bdtku9n2v] {
    margin: 0;
    font-size: 1.25rem;
}

.close-btn[b-3bdtku9n2v] {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
}

.close-btn:hover[b-3bdtku9n2v] {
    color: var(--text-primary);
}

.modal-body[b-3bdtku9n2v] {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-group[b-3bdtku9n2v] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-group label[b-3bdtku9n2v] {
    font-weight: 500;
    color: var(--text-secondary);
}

.settings-model-list[b-3bdtku9n2v] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    background: rgba(0,0,0,0.1);
}

.settings-model-item[b-3bdtku9n2v] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
}

.settings-model-item:hover[b-3bdtku9n2v] {
    background: rgba(255,255,255,0.05);
}

.settings-btn[b-3bdtku9n2v] {
    width: 100%;
    padding: 1rem;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: all 0.2s;
}

.settings-btn:hover[b-3bdtku9n2v] {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.message-bubble-container[b-3bdtku9n2v] {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.user .message-bubble-container[b-3bdtku9n2v] { align-items: flex-end; }
.assistant .message-bubble-container[b-3bdtku9n2v] { align-items: flex-start; }

.message-bubble[b-3bdtku9n2v] {
    width: 100%;
}

.message-actions-bar[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.message-bubble-container:hover .message-actions-bar[b-3bdtku9n2v],
.message-actions-bar:focus-within[b-3bdtku9n2v] {
    opacity: 1;
}

.message-bubble-container:has(.confirm-text) .message-actions-bar[b-3bdtku9n2v] {
    opacity: 1;
}

.variation-pager[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 12px;
}

.variation-pager button[b-3bdtku9n2v] {
    background: none; border: none; color: inherit; cursor: pointer; padding: 0 4px;
}
.variation-pager button:disabled[b-3bdtku9n2v] { opacity: 0.3; cursor: default; }

.confirm-text[b-3bdtku9n2v] {
    font-size: 0.8rem;
    font-weight: bold;
    color: #ff6b6b;
}

.edit-message-textarea[b-3bdtku9n2v] {
    width: 100%;
    margin-bottom: 0.5rem;
    resize: vertical;
}

.edit-actions[b-3bdtku9n2v] {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.checkbox-label[b-3bdtku9n2v] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
