body {
    font-family: Helvetica, sans-serif, sans-serif;
    display: flex;
    justify-content: center; /* Vertically centers the container */
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    flex-direction: column;
    background-color: var(--pageBackgroundColor);
    overflow-x: hidden; /* Prevent horizontal scrolling */
}
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0795ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.spinner-text {
    color: #0795ff;
    font-size: 18px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#bot-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Centers the container */
    width: var(--siteWidth); /* Your specified width */
    height: 100vh; /* Full viewport height */
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white; /* Or your preferred background */
    overflow: hidden; /* Prevents container from expanding */ 
}
#profile-section {
    display: var(--displayUserProfile);
    position: relative;
    cursor: pointer;
    border-radius: 50%;
}

#profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: var(--profileImageBorder);
    display: block !important;
    transition: transform 0.3s, box-shadow 0.3s;
}

#profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
#auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#login-button, #logout-button {
    padding: 5px 10px;
    font-size: 14px;
    color: #666;
    background-color: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#login-button:hover, #logout-button:hover {
    background-color: #005bb5;
}

#auth-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease-in-out;
}
#auth-lightbox.hidden {
    visibility: hidden;
    opacity: 0;
}
#auth-lightbox .lightbox-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
}

/* Auth Form Container */
#auth-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Input Fields */
#auth-form input {
    width: 100%;
    max-width: 280px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#auth-form input:focus {
    border-color: #0795ff;
    box-shadow: 0 0 5px rgba(7, 149, 255, 0.5);
    outline: none;
}

/* File Input */
#profile-image-input {
    padding: 5px;
}

/* Submit Button */
#auth-form button {
    width: 100%;
    max-width: 280px;
    padding: 10px;
    font-size: 16px;
    color: white;
    background-color: #0795ff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#auth-form button:hover {
    background-color: #005bb5;
}

/* Toggle Auth Link */
#toggle-auth {
    font-size: 14px;
    color: #0795ff;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

#toggle-auth:hover {
    color: #005bb5;
}

#toggle-auth.hidden {
    display: none;
}
/* Edit Profile Form Styling */
#edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

#edit-profile-form input {
    padding: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f8f9fa;
}

#edit-profile-form input:focus {
    outline: none;
    border-color: #0088ff;
    background-color: #fff;
}

.password-change-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e1e1e1;
}

.password-change-section h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.profile-image-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.profile-image-container label {
    color: #666;
    font-size: 14px;
}

/* Submit button styling */
#edit-profile-form button[type="button"] {
    background-color: #0095ff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

#edit-profile-form button[type="button"]:hover {
    background-color: #0088ee;
}

/* File input styling */
#edit-profile-form input[type="file"] {
    padding: 8px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
}

/* Error state */
#edit-profile-form input.error {
    border-color: #ff4444;
    background-color: #fff8f8;
}

/* Success state */
#edit-profile-form input.success {
    border-color: #44bb44;
    background-color: #f8fff8;
}
/* Close Button */
#close-lightbox {
    margin-top: 10px;
    padding: 8px 20px;
    font-size: 14px;
    color: white;
    background-color: #ff5e5e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#close-lightbox:hover {
    background-color: #d94444;
}

.header-container {
    display: var(--displayHeaderContainer);
    justify-content: space-between;
    align-items: center;
    width: 600px;
    margin: 0 10px;
    padding: 0;
}
:root {
    --pageBackgroundColor: #f6f5f5;
    --headerBackground: #0795ff;
    --headerTextColor: #ffffff;
    --headerHeight: 60px;
    --primaryColor: #0795ff;
    --userMessageBg: #e6f2ff;
    --siteWidth: 800px;
    --headerRadius: 10px;
    --headerShadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --pageAreaWidth: calc(var(--siteWidth) - 50px);
    --responseTimestampDisplay: block;
    --submitButtonBg: #131946;
    --submitButtonText: #ffffff;
    --displayHeaderText: block;
    --headerTopPosition: 10px;
    --headerDisplay: flex;
    --displayMobileHeader: flex;
    --botMessageShadow: none;
    --botMessageMargin: 8px 10px;
    --botMessageWidth: 95%;
    --botMessagePadding: 0 10px;
    --iconsBackgroundColor: none;
    --displayHeaderContainer: flex;
    --elementDisplay: none;
    --mobilePageWidth: 100%;
    --iconWrapperBackground: none;
    --headerLogoRadius: 50px;
    --headerLogoBorder: 1px solid rgba(240, 172, 172, 0.3);
    --headerLogoShadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    --headerLogoHeight: 25px;
    --pageIconsColor: #333;
    --iconwrapperHoverBg: rgba(255, 255, 255, 0.1);
    --chatContainerPadding: 0px 10px 40px 10px;
    --chatContainerMargin: 0;
    --chatContainerShadow: 0 2px 5px rgba(0,0,0,0.25);
    --chatFormMargin: 0 0 0 10px;
    --headerIconsRight: 30px;
    --displayUserProfile: none;
    --profileImageBorder: none;
    --mobileHeaderIconsRight: 10px;
    --displayParrotBanner: none;
    --parrotBannerBackground: rgba(255, 255, 255, 1);
    --headerWidth: 800px;
    --tableHeaderDisplay: flex;
    --tableHeaderColor: #333;
    --tableHeaderText: #fff;
    --tableBackgroundColor: #fff;
    --mathLiveInputHeight: 60px;
}

#header {
    background: var(--headerBackground); 
    position: relative; 
    min-height: var(--headerHeight);
    display: var(--headerDisplay);
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    width: var(--headerWidth);
    height: auto;
    box-shadow: var(--headerShadow);
    border-bottom-left-radius: var(--headerRadius);
    border-bottom-right-radius: var(--headerRadius);
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--headerBackgroundImage, none);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
    z-index: 0;
}

#header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--headerOverlay, rgba(0, 0, 0, 0.3)); 
}

/* Added: Ensure header content stays above background/overlay */
#header > * {
    position: relative;
    z-index: 2;
}

.header-logo {
    flex: 0 0 auto;
    padding: 5px;
    margin-right: 20px;
    border-radius: var(--headerLogoRadius);
    background-color:var(--headerLogoBg);
    border: var(--headerLogoBorder);
    box-shadow: var(--headerLogoShadow);
}

.header-logo img {
    max-height: 40px;
    width: auto;
    display: block;
    border-radius: 10px;
}
#header img {
    display: none;
}

#header-icons img,
.header-logo img {
    display: block !important;
}
.header-text {
    display: var(--displayHeaderText);
    flex: 1;
    text-align: center;
    color: var(--headerTextColor);
    font-size: 1.2em;
    padding: 10px;
    margin-left: var(--headerTextPosition);
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-text * {
    color: var(--headerTextColor);
    margin: 0;
}

#header-icons {
    position: absolute;
    top: 10px;
    right: var(--headerIconsRight);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: var(--iconsBackgroundColor);
}

.icon-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    margin: 0 5px;
    display: flex;
    justify-content: center; 
    align-items: center;
    font-size: 20px; 
    color: var(--pageIconsColor); 
    width: 25px;  
    height: 25px;
    border-radius: 50px;
    box-shadow: 
        inset 0 2px 2px rgba(255, 255, 255, 0.3),
        inset 0 -2px 2px rgba(0, 0, 0, 0.1);
    background-color: var(--iconWrapperBackground);
}

.icon-wrapper:hover {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(255, 255, 255, 0.3);
    background-color: var(--iconwrapperHoverBg);
}

.icon-wrapper img {
    width: 20px;
    height: 20px;
   
    margin-bottom: 0;
}
@keyframes shareSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#share-icon.success {
    animation: shareSuccess 0.5s ease-in-out;
}

#share-icon .tooltip.success {
    background-color: #4CAF50;
    color: white;
}
.tooltip {
    visibility: hidden;
    background-color: rgba(255, 255, 255, 0.8);
    color: #0795ff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 12px;
}

.icon-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
#bot-selector {
    position: relative;
}

#bot-menu-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--pageIconsColor);
    font-size: 20px;
}

#bot-menu-icon img {
    width: 25px;
    height: 25px;
}

#bot-dropdown {
    position: absolute;
    top: 100%;
    right: -60px;
    background-color: #f6f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 250px;
    max-height: 300px;
    overflow-y: auto;

}

#bot-dropdown.hidden {
    display: none;
}

#bot-dropdown a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

#bot-dropdown a:hover {
    background-color: #e6f2ff;
}

.bot-option-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    background-color: #f0f0f0; 
    border-radius: 8px; 
}

.bot-icon img {
    width: 20px; 
    height: 20px;
    border-radius: 50%; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    object-fit: cover; 
    display: block !important;
}

.bot-name {
    font-size: 14px; /* Adjust text size if needed */
}

#bot-dropdown a:hover {
    background-color: #e6f2ff;
}

#chat-container {
    flex-grow: 1;
    display: flex;
    width: var(--pageAreaWidth);
    flex-direction: column;
    padding: var(--chatContainerPadding); 
    bottom: 0;
    scroll-behavior: smooth;
    margin: var(--chatContainerMargin);
    overflow-y: scroll;
    background-image: url('https://storage.googleapis.com/yebochat-1ed36.appspot.com/Openchat%20Wallpaper%20(5).png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-shadow: var(--chatContainerShadow);
}
#chat-container::-webkit-scrollbar { 
    width: 0;
    height: 0;
}
.message {
    max-width: 100%; /* Ensure messages take up full width */
    padding: 0;
    border-radius: 5px;
    position: relative;
    font-size: 15px;
    line-height: 1.4;
    
}
/* Target all MathJax elements */
.MathJax {
    font-size: 18px; /* Change font size */
}

/* Target inline MathJax */
.MathJax .MathJax_SVG {
    font-size: 17px; /* Example for SVG output */
}

/* Target display-mode equations */
.MathJax_Display {
    font-size: 20px;
}

.bot-message {
    width: var(--botMessageWidth);
    padding: var(--botMessagePadding);
    margin: var(--botMessageMargin);
    background-color: var( --botMessageBg );
    color: var( --botMessageText );
    align-self: flex-start;
    animation: fadeIn 0.5s;
    box-shadow: var(--botMessageShadow);
}
.view-toggle-btn {
    background-color: #f6f5f5;
    border: none;
    color: #737373;
    cursor: pointer;
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin: 8px 0;
    padding: 5px 10px;
    text-align: left;
    width: auto;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.view-toggle-btn:hover {
    color: #0056b3;
}

.truncated-content, .full-content {
    margin-bottom: 8px;
    width: 100%;
}

/* Add a transition for smoother display changes */
.truncated-content, .full-content {
    transition: display 0.3s ease;
}
.cursor {
    display: inline-block;
    width: 3px;
    height: 10px;
    background-color: #fff;
    animation: blink 0.7s infinite;
    margin-bottom: 0;
}
@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bot-message-inner {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 0 12px;
}

.bot-message-inner > *:first-child {
    margin-top: 0;
}

.bot-message-inner > *:last-child {
    margin-bottom: 0;
}

/* Adjust styles for specific markdown elements if needed */
.bot-message-inner p {
    margin: 0;
}

.bot-message-inner p:last-child {
    margin-bottom: 0;
}

.bot-message-inner pre {
    background-color: #e0e0e0;
    padding: 2px;
    border-radius: 5px;
    overflow-x: auto;
}

.bot-message-inner code {
    background-color: #e0e0e0;
    padding: 2px 4px;
    border-radius: 3px;
}

.message.hidden-message {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.audio-message-container {
    width: 100%;
    margin: 10px 0;
}

.audio-wrapper {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 5px;
}

.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.play-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: white;
    flex-shrink: 0;
}

.play-button:hover {
    background-color: #0056b3;
}

.progress-container {
    flex-grow: 1;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.progress-indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #007bff;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 12px;
    color: #6c757d;
    min-width: 45px;
    text-align: right;
}

.audio-description {
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
}

.message-timestamp {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

/* Adjustments for bot messages */
.bot-message .audio-wrapper {
    background-color: #e3f2fd;
}

.bot-message .play-button {
    background-color: #0288d1;
}

.bot-message .play-button:hover {
    background-color: #0277bd;
}

.bot-message .progress-indicator {
    background-color: #0288d1;
}
.message img {
    width: var(--imageWidth);
    height:var(--imageHeight);
    border-radius: 5px;
    margin-top: 5px;
}
.message video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 5px;
}
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin-top: 10px;
    align-self: center;
}
.videoContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-radius: 10px;
    align-self: center;
}
.message .embed-container {
    min-width: 100%;
    margin: 10px 5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-self: center;
}

.message .embed-container iframe {
    min-width: 100%;
    max-height: 750px;
    border: none;
}

.message .embed-container p {
    margin: 10px 0 0;
    padding: 0 10px;
    font-size: 14px;
    color: #666;
}

.media-caption {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    font-style: normal;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    width: fit-content;
    width: 97.5%;
}

.message.collapsible {
    position: relative;
    padding-right: 40px;
}

.collapse-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    color: #666;
    transition: transform 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transform: rotate(-90deg); /* Start collapsed */
}

.collapse-toggle.expanded {
    transform: rotate(0deg);
}

.message-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.3s;
    overflow: hidden;
}

.message-content.expanded {
    max-height: 2000px; /* Large enough for most content */
    opacity: 1;
    visibility: visible;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.message.collapsible.collapsed-all > .collapse-toggle{
    display: none;
}

.message.collapsible.collapsed-all:first-child > .collapse-toggle {
    display: flex;
}
/* Masonry Grid */
#masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: 30px;
}

.photo {
    width: 160px;
    display: flex;
    flex-direction: column; /* Ensure name is below the image */
    align-items: center;
}

.photo img {
    width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.photo div {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #555; /* Gray color for name text */
    font-weight: 500; /* Slightly bold for better visibility */
}

/* Modal */
#photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#photo-modal div {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#photo-modal img {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

#modal-caption {
    margin-top: 10px;
    text-align: center;
    color: white;
    font-size: 18px;
}

#photo-modal button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
.google-sheet-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.google-sheet-table th,
.google-sheet-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 14px;
    background-color: var(--tableBackgroundColor);
}

.google-sheet-table th {
    background-color: var(--tableHeaderColor);
    color: var(--tableHeaderText);
    display: var(--tableHeaderDisplay);
}

.user-message {
    background-color: #f6f5f5;
    color: #3b3c36;
    align-self: flex-end;
    right: 10px;
    font-size: 13px;
}
.timestamp-message {
    font-size: 13px;
    color: #666;
    background-color: transparent !important;
    text-align: right;
    padding: 4px 8px;
}

.response-timestamp {
    font-style: italic;
    opacity: 0.8;
    background-color: var(--userMessageBg);
    display: var(--responseTimestampDisplay);
}
.bot-avatar {
    width: 30px;
    height: 30px;
    padding-right: 5px;
    border-radius: 50%;
    position: absolute;
    left: -40px;
    top: 0;
}
.user-input-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-left: 40px;
}
.select-container, .buttons-container, .multiselect-container {
    width: 100%;
}
select, .multiselect {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    background-color: #f0f0f0;
}
.button-option {
    background-color: var( --primaryButtonBg );
    color: var( --primaryButtonText); 
    border: 1px solid #f0f0f0;
    padding: 6px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.button-option:hover {
    background-color: #d9d9d9;
}
.multiselect {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px;
}
.multiselect label {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    margin: 2px;
}
.multiselect input[type="checkbox"] {
    margin-right: 5px;
}
.quantity-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #0795ff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.quantity-btn {
    padding: 4px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

.quantity-btn:hover {
    color: #007bff;
}

/* Button styles */
.button-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 5px;
}

.button-option {
    margin: 5px 5px;
}

/* Select styles */
.select-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select-quantity {
    position: absolute;
    right: 30px;
    background: #0795ff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Multiselect styles */
.multiselect-container {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

.multiselect-item {
    position: relative;
    padding: 5px;
    transition: background-color 0.2s;
}

.multiselect-item.active {
    background-color: #f0f0f0;
}

.multiselect-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.add-btn {
    padding: 6px 12px;
    background: #f0f0f0;
    color: #3b3c36;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

.add-btn:hover {
    background: #0795ff;
}
.loading-dots {
    display: inline-block;
}
.loading-dots::after {
    content: '...';
    animation: loading 1.5s infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}
@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

#user-input-area {
    display: var( --elementDisplay );
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    background-color: rgba(255, 255, 255, 0.85);
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

#user-input-field {
    flex-grow: 1;
    min-height: 1.5em; /* Start with 1 line */
    max-height: calc(4 * 1.5em); /* Limit to 4 lines */
    line-height: 1.5; /* Matches the height of a single line */
    padding: 10px;
    font-size: 14px;
    font-family: 'Helvetica', sans-serif; /* Ensures Helvetica font */
    color: #333;
    background-color: #f0f0f0;
    border: 0.5px solid #ccc;
    border-radius: 5px;
    resize: none; /* Prevent user resizing */
    overflow-y: auto; /* Add scrollbar if content exceeds max height */
}

#image-upload {
    display: none; /* Hide the file input */
}
.upload-label {
    background-color: #ffffff; /* Set background color to white */
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}
.upload-label img {
    width: 30px; 
    height: 30px; 
}
.voice-record-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-record-button img {
    width: 40px;
    height: 40px;
}

.voice-record-button .stop-icon {
    display: none;
}

.voice-record-button.recording .mic-icon {
    display: none;
}

.voice-record-button.recording .stop-icon {
    display: block;
}

.recording-status {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Add a recording animation */
@keyframes recording-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.voice-record-button.recording {
    animation: recording-pulse 1.5s infinite;
}

/* Keep existing styles consistent */
#user-input-area input[type="text"] {
    flex: 4;
}

/* Ensure proper spacing */
.upload-label,
.voice-record-button,
#send-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.message .audio-container {
    margin: 10px 0;
}
.audio-message-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.audio-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-wrapper audio {
    max-width: 250px;
    height: 40px;
}

.message-timestamp {
    font-size: 12px;
    color: #666;
}

.audio-description {
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

.user-message .audio-message-container {
    align-self: flex-end;
}
    .file-preview {
    text-align: center;
    margin-bottom: 15px;
}
.file-preview i {
    display: block;
    margin-bottom: 10px;
}
.form-file-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.form-file-button {
    padding: 8px 16px;
    background-color: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-file-button:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.form-file-name {
    color: #6b7280;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.form-file-preview {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #f9fafb;
}
.form-file-preview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.file-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}
.file-icon i {
    font-size: 1.5rem;
}
#user-input-field {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 15px;
}
#send-button {
    background-color: #ffffff; /* Set background color to white */
    border: none;
    padding: 5px;
    border-radius: 50%;
    margin-left: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
}
#send-button img {
    width: 30px; /* Set image size to 30px */
    height: 30px; /* Set image size to 30px */
}
.bold {
    font-weight: bold;
}
#date-picker {
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
}
#date-time-picker {
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
}
.date-range-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 10px 0;
}

.date-input-group {
    margin-bottom: 15px;
}

.date-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-weight: 500;
}

.date-input {
    width: 85%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
}

.date-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.date-confirm-btn {
    width: 100%;
    padding: 10px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

.date-confirm-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.date-error {
    font-size: 14px;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
}

.chat-form-container {
    background: none;
    border-radius: 12px;
    width: 100%;
    padding: 10px 0;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 97.5%;
    margin: var(--chatFormMargin);
}

.form-field-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field-label {
    width: 90%;
    font-weight: 500;
    color: #3b3c36;
    font-size: 1rem;
}

.form-field-image {
    margin: 10px;
    width: 90%;
    display: flex;
    justify-content: center;
}

.form-field-image img {
    width: auto;
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    cursor: pointer;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.form-text-input {
    width: 96%;
    padding: 10px 12px;
    border: 0.5px solid #737373;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #3b3c36;
    font-family: 'Helvetica', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f6f5f5;
}

.form-textarea {
    width: 96%;
    min-height: 80px; /* Minimum height */
    max-height: 400px; /* Maximum height */
    padding: 10px 12px;
    border: 0.5px solid #737373;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #3b3c36;
    font-family: 'Helvetica', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f6f5f5;
    resize: none; 
    overflow-y: auto; 
    line-height: 1.4;
}

.form-text-input:hover,
.form-textarea:hover {
    border-color: #737373;
}

.form-text-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* File Upload Styles */
.form-file-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-file-button {
    padding: 8px 16px;
    background-color: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-file-button:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.form-file-label {
    color: #6b7280;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.form-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 5px 10px;
}

.form-button-option {
    padding: 6px 16px;
    border: 1px solid var( --primaryButtonBorder );
    border-radius: 5px;
    background: var( --primaryButtonBg );
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    color: var( --primaryButtonText);
}

.form-button-option:hover {
    background: #f8f9fa;
}

.form-button-option.selected {
    background: var( --primaryColor );
    color: white;
    border-color: none;
}

.form-select {
    width: 98.75%;
    padding: 8px;
    border: 1px solid #737373;
    border-radius: 4px;
}

.form-select option[selected] {
    background-color: #e6f2ff; 
    font-weight: bold; 
    color: #333; 
}

.form-multiselect-container {
    border: 1px solid #737373;
    border-radius: 4px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: 94%;
}

.multiselect-option {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.multiselect-counter {
    font-size: 0.8em;
    color: #666;
    margin-top: 8px;
    text-align: right;
}

.form-multiselect-option input[type="checkbox"]:checked + label {
    background-color: #f6f5f5; 
    border: 1px solid #f6f5f5; 
    color: #333; 
    padding: 5px 10px; 
    border-radius: 4px;
}

.form-field-error {
    color: #dc3545;
    font-size: 0.8em;
    margin-top: 4px;
    display: none;
}

/* Date and DateTime in Form */
.form-date-container input,
.form-datetime-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #737373;
    border-radius: 6px;
    font-size: 14px;
}
.form-date-input,
.form-datetime-input {
    width: 96%;
    padding: 8px 12px;
    margin: 0;
    border: 1px solid #737373;
    border-radius: 6px;
    font-size: 14px;
}
/* Date Range in Form */
.form-daterange-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-daterange-container .daterange-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-daterange-container input {
    width: 96%;
    padding: 8px 12px;
    border: 1px solid #737373;
    border-radius: 6px;
    font-size: 14px;
}

.form-daterange-container .daterange-duration {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* File Upload in Form */
.form-file-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-file-button {
    padding: 8px 16px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.form-file-label {
    color: #6b7280;
    font-size: 14px;
}

/* Rating in Form */
.form-rating-container {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.rating-star {
    font-size: 24px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-star.hover {
    color: #fbbf24;
}

.rating-star.active {
    color: #f59e0b;
}

/* Submit Button */
.form-submit-button {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 10px;
    margin-right: 10px;
    background-color: var(--submitButtonBg);
    color: var(--submitButtonText);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s;
    width: 12%;
    align-self: flex-end;
}

.form-submit-button:hover {
    background-color: #2563eb;
}

/* Focus States */
.form-text-input:focus,
.form-textarea:focus,
.form-select:focus,
.form-date-container input:focus,
.form-datetime-container input:focus,
.form-daterange-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Disabled States */
.form-text-input:disabled,
.form-textarea:disabled,
.form-select:disabled,
.form-date-container input:disabled,
.form-datetime-container input:disabled,
.form-daterange-container input:disabled {
    background-color: #f6f5f5;
    cursor: not-allowed;
}
.form-button-option.selected {
    background-color: var(--primaryColor);
    color: white;
}

.form-multiselect {
    max-height: 200px;
    overflow-y: auto;
}

.form-multiselect-option label {
    font-size: 14px;
}

.multiselect-option {
    padding: 5px;
    font-size: 14px;
}

.multiselect-counter {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.form-field-container {
    transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
    opacity: 1;
    height: auto; /* Adjust based on your needs */
    overflow: hidden;
}

.form-field-container[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

.form-field-error {
    color: #dc3545;
    font-size: 0.8em;
    margin-top: 4px;
    display: none;
}

.form-field-error.visible {
    display: block;
}

.form-math-container {
    width: 100%;
    margin: 8px 0;
}

.form-math-input {
    width: 96%;
    min-height: var(--mathLiveInputHeight);
    padding: 10px;
    border: 0.5px solid #737373;
    border-radius: 6px;
    font-size: 1.2rem;
    color: #3b3c36;
    font-family: 'Helvetica', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f6f5f5;
}

.form-math-input:hover {
    border-color: #737373;
}

.form-math-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.conditional-field {
    transition: opacity 0.2s ease-in-out;
}
.location-button-container {
    width: 100%;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.location-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    transition: background-color 0.3s;
}

.location-button:hover {
    background-color: #45a049;
}

.location-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.location-button i {
    font-size: 16px;
}

.location-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #666;
}

.location-spinner.hidden {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.map-confirmation-container {
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
}

.map-wrapper {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.location-details {
    padding: 10px;
}

.location-address {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.location-confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.location-button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.location-button.confirm-location {
    background-color: #0795ff;
    color: white;
}

.location-button.retry-location {
    background-color: #f0f0f0;
    color: #666;
}

.location-button:hover {
    opacity: 0.9;
}
.location-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.location-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.location-status.confirmed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.location-status i {
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.google-maps-container {
    margin-top: 10px;
}

.maps-button {
    background-color: #4285F4;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-bottom: 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.maps-button:hover {
    background-color: #3367D6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.maps-button i {
    font-size: 16px;
}
.scancode-container {
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.video-preview-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

#scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanning-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 150px;
    border: 2px solid #0795ff;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.scan-button, .close-scanner-button {
    padding: 10px 20px;
    background-color: #0795ff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.close-scanner-button {
    background-color: #dc3545;
}

.scan-status {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.scan-button:hover {
    background-color: #0056b3;
}

.close-scanner-button:hover {
    background-color: #c82333;
}
.scan-status.error {
    color: #dc3545;
    font-weight: bold;
    margin: 10px 0;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 4px;
}

.scan-button.retry {
    background-color: #28a745;
    margin-top: 10px;
}

.scan-button.retry:hover {
    background-color: #218838;
}

.scancode-container {
    width: 100%;
    max-width: 600px;
    margin: 10px auto;
    text-align: center;
}

#scanner-video {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
}

#reader {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#reader button {
    background-color: #0795ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
}

#reader select {
    padding: 8px;
    border-radius: 4px;
    margin: 5px;
}
.slide-presentation {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
}

.slides-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
}

.slide img {
    max-width: 100%;
    max-height: calc(100% - 60px);
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.slide video,
.slide audio {
    width: 100%;
    max-height: calc(100% - 60px);
}

.slide-text {
    margin-top: 5px;
    padding: 10px;
    font-size: 21px;
    line-height: 1.4;
}


.slide-fullscreen-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
}

.slide-fullscreen-button:hover {
    background-color: #e0e0e0;
}

/* Fullscreen styles */
.slide-presentation:fullscreen {
    background: white;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.slide-presentation:fullscreen .slides-container {
    flex: 1;
    aspect-ratio: auto;
}

.slide-presentation:fullscreen .slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-presentation:fullscreen img {
    max-height: calc(100vh - 150px);
}

.slide-presentation-wrapper {
    width: 100%;
    margin: 15px 0;
}

.slide-message {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    right: 10px;
}

.slides-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    align-items: center;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
}

.slide-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var( --primaryColor );
    border-radius: 0 0 8px 8px;
}

.slide-nav-button {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.slide-nav-button:hover {
    background: #f8f8f8;
}

.slide-counter {
    font-size: 14px;
    color: #666;
}

.slide-fullscreen-button {
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.edit-button:hover {
    color: #0056b3;
}

.edited-indicator {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}

#floating-banner {
    position: fixed;
    display: var(--displayParrotBanner);
    bottom: 0;
    width: var(--pageAreaWidth);
    background-color: var(--parrotBannerBackground); 
    color: #190192;
    text-align: center;
    padding: 0;
    font-size: 14px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0);
    z-index: 1000;
}

#floating-banner a {
    color: #190192;
    text-decoration: none;
    font-weight: bold;
}

#floating-banner a:hover {
    text-decoration: none;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        height: calc(100vh - 20px);
    }
    
    #bot-container {
        position: fixed;
        width: var(--mobilePageWidth);
        bottom: 10px;
        height: calc(100vh - 20px);
        margin: 5px;
    }
    #profile-section {
        position: absolute; 
        padding: 5px;
        top: 5px;
        right: 10px;
    }
    #header {
        display: var(--displayMobileHeader);
        width: 100%;
        min-height: var(--mobileHeaderHeight);
        margin-top: 0;
        padding: 12px 0;
    }
    .header-container {
        width: 100%;
        top: var(--headerTopPosition);
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .header-text {
        display: var(--displayHeaderText);
        margin-left: var(--mobileHeaderTextPosition);
        font-size: 16px;
        border-bottom-right-radius: var(--headerTextBottomRadius);
        border-bottom-left-radius: var(--headerTextBottomRadius);
    }
    .header-logo {
        flex: 0 0 auto;
        padding: 5px;
        margin-left: 5px;
        margin-top: -10px;
        border-radius: 35px;
        display: var(--headerImageDisplay);
    }
    .header-logo img {
        height: var(--headerLogoHeight);
        width: auto;
    }
    #header-icons {
        position: absolute;
        top: 10px;
        right: var(--mobileHeaderIconsRight);
    }
    .icon-wrapper {
        width: 20px;
        height: 20px;
        padding: 4px;
        margin: 2px;
      }
    .icon-wrapper img{
        width: 18px;
        height: 18px;
    }
    .message {
        font-size: 16px; 
    }
    .MathJax {
        font-size: 19px; /* Change font size */
    }
    .bot-message {
    width: 98%;
    margin-right: 0;
    padding: var(--botMessagePadding);
    }
    .message img {
        width: 100%;
        height: auto;
    }
    .user-message {
    max-width: 80%;
    width: auto;
    }
    .timestamp-message {
        font-size: 12px;
    }
    #chat-container {
        padding: var(--chatContainerPadding); 
        width: 100%;
        margin: 5px 0 20px 0; 
    }
    .chat-form {
        margin-left: 10px;
        width: 96%;
    }
    .embed-container {
        width: 100%;
    }
    .embed-container iframe {
        width: 100%;
    }
    .bot-avatar {
        left: -30px; /* Adjust avatar position for smaller screens */
    }
    #user-input-area {
        position: fixed;
        bottom: 0;
        width: 100%;
        padding: 5px;
        margin: 0;
    }
        
    .voice-record-button img {
        width: 18px;
        height: 18px;
    }
    .chat-form-container {
        padding: 5px;
        width: 100%;
        margin-bottom: 20px;
    }
    .form-field-container {
        min-width: 100%;
    }
    .form-button-container {
        flex-direction: column;
    }

    .form-button-container .button-option {
        width: 100%;
    }
    .form-text-input,
    .form-textarea {
        width: 93.5%;
        font-size: 16px;
    }
    .form-date-input,
    .form-datetime-input {
    width: 93.5%;
    }
    
    .form-select {
        width: 97.5%;
    }
    .form-file-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-math-container {
        width: 100%;
    }
    .form-submit-button {
        width: 24%;
        margin-right: 5px;
    } 
    .form-field-label {
        font-size: 16px;
        font-weight: normal;
    }
    .form-field-image img {
        width: 97.5%;    
    }
}
@media (max-width: 480px) {
    .photo {
        width: 120px; 
    }
    .photo img {
        width: 100px;
        height: auto;  
    }
    #masonry-grid {
        margin-left: 0;
    }
}