body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(45deg, #e0f2f7, #e6f7f2, #f2e0f7, #f7f2e0, #e0f2f7);
    background-size: 400% 400%;
    animation: animatedBackground 20s ease infinite;
    color: #333;
}

@keyframes animatedBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#left-logo-container {
    position: absolute;
    top: 0.5px;
    right: 25px;
    width: 200px;
    height: 200px;
}

#left-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#right-logo-container {
    position: absolute;
    top: 0.5px;
    left: 25px;
    width: 200px;
    height: 200px;
}

#right-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#calendar-widget-link {
    position: absolute;
    top: 270px; /* Moved further below the clinic logo */
    left: 25px;
    text-decoration: none; /* Remove underline from the link */
    transition: transform 0.2s ease, box-shadow 0.2s ease, top 0.3s ease; /* Add transition for top */
}

body.hang-up-active #calendar-widget-link {
    top: 350px; /* Adjust position when hang up button is active */
}

#calendar-widget-link:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

#calendar-widget {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Reduced gap */
    font-size: 12px; /* Smaller font size */
    color: #333;
    width: 180px; /* Smaller fixed width */
    height: 180px; /* Smaller fixed height */
    justify-content: center;
    overflow: hidden; /* Hide overflow if content is too large */
}

#current-date {
    font-weight: bold;
    color: #007bff;
    font-size: 14px; /* Slightly larger for date */
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px; /* Smaller gap */
    width: 100%;
    margin-top: 5px; /* Reduced margin */
    text-align: center;
}

.day-header {
    font-weight: bold;
    color: #555;
    font-size: 10px; /* Smaller day header font */
}

.calendar-day {
    padding: 4px 2px; /* Smaller padding */
    border-radius: 3px; /* Smaller border radius */
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 11px; /* Smaller day number font */
}

.calendar-day:hover {
    background-color: #e0f7fa;
}

.calendar-day.selected {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 1px solid #28a745; /* Smaller border for today */
}

.empty-day {
    visibility: hidden;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: rgb(97, 119, 216);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button#startButton i.fas.fa-microphone {
    margin-right: 5px;
}

canvas {
    margin-top: 20px;
    border: 1px solid #000;
}

#microphone-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px; /* Added to move the microphone down */
    margin-bottom: 10px; /* Reduced margin to make space for hang up button */
}

#hangUpButton {
    background-color: #dc3545; /* Red color for hang up */
    color: white;
    border: none;
    border-radius: 20px; /* Slightly less rounded */
    padding: 10px 20px; /* Smaller padding */
    font-size: 16px; /* Smaller font */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); /* Slightly smaller shadow */
}

#hangUpButton:hover {
    background-color: #c82333;
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

#hangUpButton:active {
    transform: translateY(0); /* Press down effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#hangUpButton i {
    margin-right: 10px; /* More space for icon */
}

#startButton {
    background-color: transparent;
    border: none;
    color: #beb8b8;
    cursor: pointer;
    outline: none;
}

#wave {
    width: 50px;
    height: 15px;
    background-color: #007bff;
    border-radius: 50px;
    display: none;
    transition: height 0.1s ease-in-out;
}

@keyframes wave {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: 0 0;
    }
}

button.recording {
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px #007bff;
    }

    50% {
        box-shadow: 0 0 20px #007bff;
    }

    100% {
        box-shadow: 0 0 5px #007bff;
    }
}

#transcription {
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
}

#chat-container {
    width: 90%;
    max-width: 700px;
    height: 350px;
    margin-top: 30px;
    overflow-y: auto; /* Use auto for better scrollbar handling */
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: margin-top 0.3s ease; /* Add transition for margin-top */
}

body.hang-up-active #chat-container {
    margin-top: 110px; /* Adjust position when hang up button is active */
}
#chat-container::-webkit-scrollbar {
    /* This rule was previously hiding the scrollbar. Removing 'display: none;' to make it visible. */
}

#chat-messages {
    display: flex;
    flex-direction: column;
}

.message {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 5px;
    word-break: break-word;
    animation: fadeIn 0.5s ease-in-out;
}

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

.user-message {
    background-color: #e0f7fa; /* Light blue */
    align-self: flex-start;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 18px;
    color: #212121;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-message.interim {
    opacity: 0.6; /* Make interim messages slightly transparent */
    font-style: italic;
}

.nancy-message {
    background-color: #fbe9e7; /* Light orange/peach */
    align-self: flex-end;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 18px;
    color: #212121;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#chat-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

#data-buttons-container {
    position: absolute;
    top: 280px; /* Adjusted to move the buttons further down */
    right: 50px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between items */
    align-items: flex-end; /* Align items to the right */
    transition: top 0.3s ease; /* Add transition for top */
}

body.hang-up-active #data-buttons-container {
    top: 360px; /* Adjust position when hang up button is active */
}

.data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Space between icon and label */
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.data-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.data-item a {
    text-decoration: none;
    color: #28a745; /* Icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; /* Fixed width for icon container */
    height: 50px; /* Fixed height for icon container */
    border-radius: 8px; /* Changed to make it square with slight rounding */
    background-color: #e6ffe6; /* Light background for icon */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.data-item a i {
    font-size: 28px; /* Larger icon size */
}

.data-label {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Remove previous button styles that are now handled by .data-item */
button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: rgb(97, 119, 216);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

#copyright {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #666;
}
