/* Base styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --text-color: #212529;
    --sidebar-color: #f8f9fa;
    --message-user-bg: #e9f5ff;
    --message-bot-bg: #f8f9fa;
    --border-radius: 8px;
    --spacing: 16px;
}

/* App container layout */
.app-container {
    display: flex;
    /* Use visual viewport variable when available */
    min-height: 0;
    height: calc(var(--vvh, 1vh) * 100);
    width: 100%;
}

/* Mobile header container - hidden on desktop */
#mobile-header-container {
    display: none;
}

/* Desktop layout - default */
#sidebar-container {
    display: block;
}

/* Sidebar styling */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-background);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-explanation {
    margin-top: 20px;
    overflow-y: auto;
    background-color: var(--markdown-background-color);
    color: var(--markdown-text-color);
    padding: 10px;
    border-radius: 5px;
}

/* Ensure all elements in the markdown content inherit the text color */
.sidebar-explanation * {
    color: inherit;
}

/* Style links in the markdown content */
.sidebar-explanation a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Style lists in markdown content */
.sidebar-explanation ul,
.sidebar-explanation ol {
    padding-left: 20px;
    margin: 10px 0;
}

.sidebar-explanation li {
    margin-bottom: 5px;
}

.sidebar-explanation ul li {
    list-style-type: disc;
}

.sidebar-explanation ol li {
    list-style-type: decimal;
}

.content-area {
    flex: 1;
    background: linear-gradient(135deg, var(--gradient-start-color), var(--gradient-end-color));
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto; /* prefer dynamic viewport on desktop */
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;        /* laat kinderen (ChatApp) krimpen */
}

html, body {
    height: calc(var(--vvh, 1vh) * 100); min-height: 0;
}

/* Base reset & overflow control */
* { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow: hidden; /* prevent double scroll; inner containers handle scrolling */
}

.container {
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 280px;
    background-color: var(--sidebar-background);
    border-right: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: var(--spacing);
    overflow-y: auto;
}

.logo {
    margin-bottom: var(--spacing);
    text-align: center;
}

.logo img {
    max-width: 100%;
    max-height: 60px;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-text {
    margin-bottom: var(--spacing);
}

.team-info {
    margin-top: auto;
    padding-top: var(--spacing);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.team-member {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.team-member img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: var(--spacing);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Indicator voor taalwijziging */
.language-change-indicator {
    background-color: rgba(var(--primary-color-rgb, 0, 123, 255), 0.2);
    color: white;
    padding: 5px 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.language-change-indicator.success {
    background: #d4edda;
    color: #155724;
}

.language-change-indicator.error {
    background: #f8d7da;
    color: #721c24;
}

/* .chat-messages wordt nu gedefinieerd in chat-components.css */

/* .message wordt nu gedefinieerd in chat-components.css */

.user-message {
    float: right;
}

.bot-message {
    float: left;
}

/* .message-content wordt nu gedefinieerd in chat-components.css */

/* moved to ChatMessage.vue scoped styles */

/* .chat-input-container wordt nu gedefinieerd in chat-components.css */

#chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: var(--border-radius);
    resize: none;
    height: 60px;
    margin-right: 8px;
}

/* .typing-indicator en bijbehorende animaties worden nu gedefinieerd in chat-components.css */

/* Error page styles */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.error-box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
    max-width: 500px;
}

.error-message {
    margin: 1rem 0;
    color: #dc3545;
}

.error-actions {
    margin-top: 1.5rem;
}

/* .btn-primary wordt nu gedefinieerd in chat-components.css */

/* Mobile responsive layout */
@media (max-width: 768px) {
    /* Switch to vertical layout */
    .app-container {
        flex-direction: column;
    }
    
    /* Hide desktop sidebar on mobile */
    #sidebar-container {
        display: none;
    }
    
    /* Show mobile header on mobile */
    #mobile-header-container {
        display: block;
        width: 100%;
    }
    
    :root { --mobile-header-height: 60px; } /* default/minimum */
}

/* Responsieve design regels worden nu gedefinieerd in chat-components.css */
