/* USA Health Life - Chat Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.new-chat-btn {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #5a67d8;
}

/* Main Layout */
.main-container {
    display: flex;
    height: calc(100vh - 73px);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: #718096;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.chat-item:hover {
    background: #f7fafc;
}

.chat-item.active {
    background: #ebf8ff;
    border-color: #bee3f8;
}

.chat-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.chat-preview {
    font-size: 0.8rem;
    color: #718096;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-time {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 0.25rem;
}

/* Chat Area */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.chat-title-main {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.chat-subtitle-main {
    color: #718096;
    font-size: 0.9rem;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #667eea;
    color: white;
}

.message.assistant .message-avatar {
    background: #48bb78;
    color: white;
}

.message-content {
    background: #f7fafc;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    line-height: 1.6;
    color: #2d3748;
}

.message.user .message-content {
    background: #667eea;
    color: white;
}

.message.assistant .message-content {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 1rem;
    max-width: 80%;
}

.typing-dots {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #a0aec0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Area */
.input-container {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: #667eea;
}

.send-button {
    width: 44px;
    height: 44px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #5a67d8;
}

.send-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.welcome-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

.suggestion-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.suggestion-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.suggestion-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.suggestion-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Disclaimer */
.disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fef5e7;
    border-top: 1px solid #f6e05e;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: #744210;
    text-align: center;
    z-index: 1000;
}

.disclaimer strong {
    color: #744210;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-container {
        height: calc(100vh - 73px - 45px);
    }
    
    .messages-container {
        padding: 1rem;
    }
    
    .input-container {
        padding: 1rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .welcome-suggestions {
        grid-template-columns: 1fr;
    }
}