header {
    position: fixed;
    top: 0px;

    width: 100%;
    height: calc(1rem + 12px);

    line-height: calc(1rem + 12px);
    font-family: Georgia, serif;

    background-color: #000;

    overflow: hidden;
    z-index: 1000; /* always on top (above chat) */

    nav {
        display: flex;
        gap: 24px;
    }

    a:link, a:visited, a:active {
      color: #ddd;
      text-decoration: none;
    }

    a:hover {
        transition: color .5s;
        color: #fff;
    }

    nav a:hover {
        text-decoration: underline;
    }
}

footer {
    width: 100%;
    height: calc(1rem + 12px);

    color: #ccc;
    font-size: 0.8rem;

    line-height: calc(1rem + 12px);
    background-color: #000;

    overflow: hidden;

    .contact {
        display: flex;
        gap: 6px;

        a:link, a:visited, a:active, a:hover {
            color: #ccc;
            text-decoration: none;
        }
        a:hover {
            color: #fff;
        }
    }
}

#chatbot {
    #opened-chatbot {
        display: flex;
        flex-direction: column;
        
        width: clamp(0px, calc(100% - 24px), 350px);
        height: clamp(0px, calc(100vh - 24px - 1rem - 12px), 500px);
        border-radius: 0.5rem;

        overflow: hidden;
        z-index: 900;
    }

    #closed-chatbot {
        display: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;

        z-index: 901;
    }

    .bottom-left {
        position: fixed;
        bottom: 12px;
        right: 12px;
    }

    .gray-glass {
        background-color: rgba(200, 200, 200, 0.5);
        backdrop-filter: blur(7px);
        border: 1px solid #ccc;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); 
    }

    .chat-header {
        color: #333;
        width: calc(100% - 12px);
        padding: 6px;
        font-weight: bold;
        text-align: center;
        font-size: 1.1rem;
    }

    #chatbot-info-container {
        display: flex;
        align-items: center;
        color: #777;
        padding-left: 3.8px; /* Align manually */
    }

    #minimize-chatbot-container {
        justify-content: flex-end;
        padding-right: 3.5px; /* Align manually */
    }

    #closed-chatbot {
        justify-content: center;
    }

    .chatbot-size-toggle {
        display: flex;
        align-items: center;

        color: #777;
        :hover {
            cursor: pointer;
            color: #333;
        }
    }

    #chatbot-info {
        padding-left: 2px;
    }

    .chat-messages {
        flex: 1 1 auto;
        color: #ddd;
        padding: 0.5rem 1rem;
        overflow-y: auto;
        overflow-x: hidden;
        overflow-wrap: break-word;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        font-size: clamp(0.9rem, 1vw, 1.1rem);
    }

    .chat-message {
        padding: 0.5rem 0.75rem;
        border-radius: 0.5rem;
        max-width: 80%;
    }

    .chat-message.assistant {
        background-color: #333;
        align-self: flex-start;
    }

    .chat-message.user {
        background-color: #660000;
        align-self: flex-end;
    }
    
    .chat-message.error {
        background-color: #aa0000;
        align-self: center;
    }

    .chat-prompt {
        display: flex;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .chat-prompt input {
        flex: 1;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 0.5rem;
        color: #333;
    }

    .chat-prompt button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        background-color: #660000;
        color: #ddd;
        border: none;
        border-radius: 0.5rem;
        cursor: pointer;
    }

    .chat-prompt button:hover {
        background-color: #4d0000;
    }

    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background-color: #333;
        border-radius: 3px;
    }
}
