/* Basic reset and font settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a86e8;
    --primary-dark: #3b78e7;
    --primary-light: #e9f5ff;
    --secondary-color: #4caf50;
    --secondary-light: #e8f5e9;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #888;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #ddd;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 25px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.robot-doctor {
    /*position: absolute;
    /*top: 10px; /* Adjust this value to move the image up or down */
    /*left: 10px; /* Adjust this value to move the image left or right */
    /*width: 100px; /* Adjust the size of the image */
    /*height: auto; /* Maintain aspect ratio */
    /*z-index: 10; /* Ensure the image appears above other elements */
    width: 20%; /* Adjust the size of the image to match the logo's height */
    height: auto; /* Maintain aspect ratio */
}

/* Ensure the header has a relative position so the absolute positioning of the image works within it */


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    position: relative; /* Needed for absolute positioning of the icon */
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.header-content {
    display: flex;
    align-items: center; /* Vertically center the image and logo */
    gap: 10px; /* Add some space between the image and logo */
    justify-content: center; /* Center the content horizontally */
    position: relative; /* Needed for absolute positioning of the icon */
    width: 100%; /* Ensure header-content takes full width */
}

.shopping-cart-icon {
    position: absolute;
    top: 50%;
    right: 20px; /* Adjust as needed */
    transform: translateY(-50%);
    font-size: 1.8rem; /* Adjust icon size */
    color: var(--primary-color); /* Use theme color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.shopping-cart-icon:hover {
    color: var(--primary-dark);
}

header h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0.7);
    transition: transform 0.3s ease;
}

.logo:hover::after {
    transform: scaleX(1);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 5px;
    font-weight: 300;
}

/* Chat container styles */
.chat-container {
    flex: 1;
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.chat-container:hover {
    box-shadow: var(--shadow-md);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 60vh;
    scroll-behavior: smooth;
}

/* Message styles */
.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message-content {
    padding: 15px;
    border-radius: var(--border-radius-md);
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.user .message-content {
    background-color: var(--primary-light);
    color: var(--text-dark);
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0;
    border-left: 3px solid var(--primary-color);
}

.assistant .message-content {
    background-color: var(--secondary-light);
    color: var(--text-dark);
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 0;
    border-right: 3px solid var(--secondary-color);
}

.system .message-content {
    background-color: #e5f8ef;
    color: var(--text-dark);
    align-self: center;
    margin: 0 auto;
    text-align: center;
    max-width: 90%;
    border-top: 3px solid #77e5737c;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Input container styles */
.input-container {
    display: flex;
    padding: 15px;
    background-color: #f1f3f4;
    border-top: 1px solid var(--border-color);
}

#user-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    resize: none;
    min-height: 50px;
    max-height: 150px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#user-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 134, 232, 0.2);
}

#send-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 12px 25px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#send-button:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Footer styles */
footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 15px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Loading animation */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
}

.loading-dots div {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots div:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    } 
    40% {
        transform: scale(1.0);
    }
}

/* Health indicators */
.health-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Pulse animation for branding */
.pulse {
    position: relative;
}

.pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    #send-button {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .chat-container {
        border-radius: var(--border-radius-sm);
    }
    
    .message-content {
        max-width: 95%;
        padding: 12px;
    }
    
    #user-input {
        padding: 10px;
    }
    
    #send-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Print styles for reports */
@media print {
    header, .input-container, footer {
        display: none;
    }
    
    .chat-container {
        box-shadow: none;
        border: none;
    }
    
    .message-content {
        border: 1px solid #eee;
    }
} 