﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, 'Noto Sans', sans-serif;
    background-color: #14191f;
    color: #ffffff;
}

.root-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.layout-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

/* Mobile-first header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-bottom: 1px solid #2b3540;
    padding: 12px 16px;
    height: 60px;
}

/* Mobile menu button - visible only on mobile */
.mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #dce7f3;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-right: 12px;
}

.mobile-menu-button:hover {
    background-color: #2b3540;
}

.mobile-menu-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.header-brand {
    flex: 1;
}

/* Hide mobile menu button on larger screens */
@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
    
    .header-brand {
        flex: none;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .header {
        padding: 12px 32px;
        height: 70px;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .header {
        padding: 12px 40px;
        height: 80px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
}

.logo {
    width: 16px;
    height: 16px;
}

    .logo svg {
        width: 100%;
        height: 100%;
        fill: #ffffff;
    }

.header-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: #ffffff;
}

.header-right {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 32px;
}

.settings-button {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 9999px;
    height: 40px;
    background-color: #2b3540;
    color: #ffffff;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.015em;
    min-width: 0;
    padding: 0 10px;
    border: none;
}

    .settings-button svg {
        width: 20px;
        height: 20px;
        fill: #ffffff;
    }

/* Mobile-first responsive layout */
.main-content {
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 8px;
    gap: 4px;
    flex-direction: column;
}

.sidebar-left {
    display: none; /* Hidden on mobile by default */
    flex-direction: column;
    width: 100%;
    padding: 16px;
    border-bottom: 1px solid #2b3540;
    order: -1; /* Place at top on mobile when visible */
    background-color: #14191f;
    position: relative;
    z-index: 100;
}

/* Show mobile menu when open */
.sidebar-left.mobile-open {
    display: flex;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .main-content {
        flex-direction: row;
        padding: 20px 24px;
    }
    
    .sidebar-left {
        display: flex;
        width: 320px;
        border-right: 1px solid #2b3540;
        border-bottom: none;
        order: 0;
    }
    
    /* Mobile-open class not needed on larger screens */
    .sidebar-left.mobile-open {
        display: flex;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .sidebar-left {
        width: 400px;
        padding: 20px;
    }
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: #ffffff;
    padding: 16px 16px 8px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #14191f;
    padding: 16px;
    min-height: 56px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
    margin-bottom: 4px;
}

.option-item:hover {
    background-color: #2b3540;
}

.option-item:active {
    background-color: #3a4554;
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #3d66d3;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

    .icon-container svg {
        width: 24px;
        height: 24px;
        fill: #ffffff;
    }

.option-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive chat container */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    height: calc(100vh - 180px); /* Responsive height based on viewport */
    min-height: 400px;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 8px;
    position: relative;
    margin-bottom: 12px;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .chat-container {
        max-width: 960px;
        height: calc(100vh - 200px);
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .chat-container {
        height: 700px;
    }
}

    /* Customize the scrollbar appearance */
    .chat-container::-webkit-scrollbar {
        width: 8px;
    }

    .chat-container::-webkit-scrollbar-track {
        background: #1a222c;
        border-radius: 4px;
    }

    .chat-container::-webkit-scrollbar-thumb {
        background: #3a4554;
        border-radius: 4px;
    }

        .chat-container::-webkit-scrollbar-thumb:hover {
            background: #4a5568;
        }

/* Firefox scrollbar styling */
.chat-container {
    scrollbar-width: thin;
    scrollbar-color: #3a4554 #1a222c;
}



/* Mobile-first chat message */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 9999px;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.message-sender {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #9dadbe;
}

.message-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 12px;
    padding: 10px 12px;
    background-color: #2b3540;
    color: #ffffff;
    width: 100%;
    word-wrap: break-word;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .chat-message {
        gap: 12px;
        padding: 16px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    .message-sender {
        font-size: 13px;
        max-width: 360px;
    }
    
    .message-text {
        font-size: 16px;
        padding: 12px 16px;
        max-width: none;
    }
}

/* Mobile-first input container */
.input-container {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
}

.input-label {
    display: flex;
    flex-direction: column;
    min-width: 120px;
    height: 44px;
    flex: 1;
}

.input-wrapper {
    display: flex;
    flex: 1;
    align-items: stretch;
    border-radius: 12px;
    height: 100%;
    background-color: #2b3540;
    overflow: hidden;
}

.chat-input {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 0%;
    resize: none;
    overflow: hidden;
    border-radius: 0.75rem;
    color: white;
    border: none;
    background-color: #2b3540;
    height: 100%;
    padding-left: 12px;
    padding-right: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .input-container {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .input-label {
        min-width: 160px;
        height: 48px;
    }
    
    .chat-input {
        padding-left: 1rem;
        padding-right: 0.5rem;
        font-size: 1rem;
    }
}

    .chat-input::placeholder {
        color: #9dadbe;
    }

.input-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2b3540;
    border-radius: 0 12px 12px 0;
    padding-right: 8px;
}

.button-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

    .icon-button svg {
        width: 20px;
        height: 20px;
        fill: #9dadbe;
    }

.send-button {
    min-width: 84px;
    max-width: 480px;
    cursor: pointer;
    height: 32px;
    padding: 0 16px;
    background-color: #dce7f3;
    color: #14191f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 9999px;
    border: none;
    display: none;
}

@media (min-width: 480px) {
    .send-button {
        display: block;
    }
}

/* Mobile-first sidebar right */
.sidebar-right {
    display: none; /* Hidden on mobile by default */
    flex-direction: column;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #2b3540;
    padding: 16px;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .sidebar-right {
        display: flex;
        width: 280px;
        max-height: none;
        border-top: none;
        border-left: 1px solid #2b3540;
        padding: 20px;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .sidebar-right {
        width: 320px;
    }
}

.conversation-date {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.015em;
    color: #9dadbe;
    padding: 8px 16px;
    text-align: center;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #14191f;
    padding: 16px;
    min-height: 56px;
}

.conversation-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-container {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.input-label {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    height: 48px;
    flex: 1;
}

.input-wrapper {
    display: flex;
    flex: 1;
    align-items: stretch;
    border-radius: 12px;
    height: 100%;
    background-color: #2b3540; /* Ensure seamless background */
    overflow: hidden; /* Prevent any overflow issues */
}

.chat-input {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 0%;
    resize: none;
    overflow: hidden;
    border-radius: 0.75rem;
    color: white;
    border: none;
    background-color: #2b3540;
    height: 100%;
    padding-left: 1rem;
    padding-right: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

    .chat-input:focus {
        outline: 2px solid transparent;
        outline-offset: 2px;
        box-shadow: none;
        border: none;
    }

    .chat-input::placeholder {
        color: #9dadbe;
    }

.input-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* Inherit from wrapper */
    border-radius: 0 12px 12px 0;
    padding: 0 16px 0 0; /* pr-4 from original */
}

.button-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px; /* !pr-2 from original */
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px; /* p-1.5 */
    background: none;
    border: none;
    cursor: pointer;
}

    .icon-button svg {
        width: 20px;
        height: 20px;
        fill: #9dadbe;
    }

.send-button {
    min-width: 84px;
    max-width: 480px;
    cursor: pointer;
    height: 32px;
    padding: 0 16px;
    background-color: #dce7f3;
    color: #14191f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 9999px;
    border: none;
    display: none;
}

@media (min-width: 480px) {
    .send-button {
        display: block;
    }
}