/* Base Styles */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --border-color: #e5e7eb;
    --hover-bg: #f3f4f6;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
}

/* Header */
.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f3f4f6;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-details {
    display: flex;
    flex-direction: column;
}

.chat-with {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #10b981;
    animation: pulse 2s infinite;
}

.agent-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
}

.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--primary-color);
    background-color: #eff6ff;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.new-chat-btn:hover {
    background-color: #dbeafe;
}

.close-btn {
    padding: 0.25rem;
    color: var(--text-light);
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: var(--hover-bg);
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    line-height: 1.5;
}

.user-message {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
}

.bot-message {
    align-self: flex-start;
    background-color: #f3f4f6;
    color: var(--text-color);
}

/* Footer */
.chat-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    resize: none;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 1.5rem;
    max-height: 8rem;
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.send-btn {
    padding: 0.5rem;
    color: var(--primary-color);
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: var(--hover-bg);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-color);
}

/* Terms Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 32rem;
    max-height: 90vh;
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-header button {
    padding: 0.25rem;
    color: var(--text-light);
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-header button:hover {
    background-color: var(--hover-bg);
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 1rem 0;
}

.modal-body ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .chat-container {
        height: 100vh;
        border: none;
    }

    .message {
        max-width: 90%;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
} 