/* Fonts */
:root {
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
    --heading-font: "Raleway", sans-serif;
    --nav-font: "Inter", sans-serif;
}

/* Global Colors - The following color variables are used throughout the website. Updating them here will change the color scheme of the entire website */
:root {
    --background-color: #ffffff; /* Background color for the entire website, including individual sections */
    --default-color: #444444; /* Default color used for the majority of the text content across the entire website */
    --heading-color: #273d4e; /* Color for headings, subheadings and title throughout the website */
    --accent-color: #0065a6; /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
    --surface-color: #ffffff; /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
    --contrast-color: #ffffff; /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
    --nav-color: #e5eaee; /* The default color of the main navmenu links */
    --nav-hover-color: #0065a6; /* Applied to main navmenu links when they are hovered over or active */
    --nav-mobile-background-color: #ffffff; /* Used as the background color for mobile navigation menu */
    --nav-dropdown-background-color: #ffffff; /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
    --nav-dropdown-color: #444444; /* Used for navigation links of the dropdown items in the navigation menu. */
    --nav-dropdown-hover-color: #0065a6; /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

.bubble-user,
.bubble-admin {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 75%;
    word-wrap: break-word;
    position: relative;
}

.bubble-user {
    background: #dcf8c6;
    align-self: flex-end;
}

.bubble-admin {
    background: #fff;
    border: 1px solid #ddd;
}

.bubble-actions {
    display: none;
    position: absolute;
    bottom: -18px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 2px 5px;
}

.bubble-actions .btn-action {
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    margin: 0 2px;
    cursor: pointer;
}

.chat-message:hover .bubble-actions {
    display: flex;
}

.chat-toast {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    max-width: 60%;
    margin: 5px auto;
    text-align: center;
    animation: fadeInOut 2s ease forwards;
}
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 5px;
    border: 2px solid #fff;
}

.status-dot.online {
    background-color: #28a745;
    animation: pulse-green 1.5s infinite;
}

.status-dot.offline {
    background-color: #6c757d;
    animation: none;
    box-shadow: none;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.chat-header .status-dot {
    width: 10px;
    height: 10px;
    margin-left: 5px;
    border: 1px solid #fff;
}

.chat-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}
.chat-button .status-dot {
    position: absolute;
    bottom: 40px;
    right: 40px;
}

.chat-button:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
    color: var(--contrast-color);
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.chat-box {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.chat-header {
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    animation: bounce 2s infinite;
    background-color: var(--accent-color);
}

.chat-body .bubble-user {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 15px 15px 0 15px;
    margin: 4px 0;
    max-width: 80%;
    font-size: 14px;
    animation: fadeInRight 0.3s ease-in-out;
}
.chat-body .bubble-admin {
    display: inline-block;
    background: #e9ecef;
    color: #000;
    padding: 8px 12px;
    border-radius: 15px 15px 15px 0;
    margin: 4px 0;
    max-width: 80%;
    font-size: 14px;
    animation: fadeInLeft 0.3s ease-in-out;
}

.status {
    font-size: 13px;
    color: gray;
    margin-top: 4px;
    text-align: right;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.5s ease-in-out;
}

.dots span {
    animation: blink 1.5s infinite;
}
.dots span:nth-child(2) {
    animation-delay: 0.3s;
}
.dots span:nth-child(3) {
    animation-delay: 0.6s;
}

/* Icon Animations */
.send-icon {
    animation: fly 2s infinite;
}
.exit-icon {
    animation: shake 2s infinite;
}

.btn-chat {
    background-color: var(--accent-color);
    color: white;
}
.btn-chat:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
    color: var(--contrast-color);
}

#send-chat.loading {
    background-color: var(--accent-color) !important;
    color: #fff !important;
    cursor: wait;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #0065a6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #273d4e;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f8f9fa;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0065a6, #0d6efd);
    border-radius: 10px;
    border: 2px solid #f8f9fa;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0065a6, #520dc2);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #0065a6 #f8f9fa;
}
