@import 'components/file-preview-modal.css';

/* Main Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid transparent;
    /* Optional border */
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease;
    z-index: 10;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-body);
    min-width: 0;
    /* Prevent flex child overflow */
    /* Prevent flex child overflow */
    transition: all 0.3s ease;
}

#create-media-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Centered Layout for New Chat */
.main-content.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.main-content.empty-state .chat-header-container {
    position: absolute;
    top: 0;
    width: 100%;
}

.main-content.empty-state .chat-area {
    flex: 0 0 auto;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 32px;
    /* Space between chips and input */
}

.main-content.empty-state .input-area-container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    background-color: transparent;
}

.main-content.empty-state .input-wrapper {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-header {
    display: none;
    /* Hidden by default */
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-body);
    color: var(--text-primary);
    gap: var(--space-md);
}

.mobile-title {
    font-weight: 500;
    font-size: var(--font-size-lg);
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 180px var(--space-lg) 0 var(--space-lg);
    /* Increased space for header and scrollbar */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content max-width */
}

.input-area-container {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: var(--space-md);
    background-color: var(--bg-body);
    /* Match body to cover scroll */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        height: 100%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .mobile-header {
        display: flex;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

#create-media-view,
#projects-view,
#learning-view,
#permissions-view,
#stats-view,
#credentials-view,
#user-activity-view,
#applications-view,
#risk-shield-view,
#models-view,
#compare-view,
#start-view,
#welcome-admin-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Impersonation Banner */
.impersonation-banner {
    background: linear-gradient(90deg, #F37B20, #FF9E5E);
    color: white;
    padding: 8px 16px;
    text-align: center;
    font-size: 0.9rem;
    z-index: 9999;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stop-impersonation-btn {
    background: white;
    color: #F37B20;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.stop-impersonation-btn:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

body.has-impersonation-banner .app-container {
    height: calc(100vh - 38px);
}