/* CHATBOT SECTION */
    .chatbot-toggler {
         position: fixed;
        right: 40px;
        bottom: 35px;
        height: 50px;
        width: 50px;
        border: none;
        outline: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background: #c5a059;
        color: #0a192f;
        z-index: 999;
        border-radius: 50%;
        transition: all 0.2s ease;
    }

    .show-chatbot .chatbot-toggler {
        transform: rotate(90deg);
    }

    .chatbot-toggler i {
        position: absolute;
        font-size: 1.7rem;
    }

    .show-chatbot .chatbot-toggler i:first-child,
    .chatbot-toggler i:last-child {
        opacity: 0;
    }

     .show-chatbot  .chatbot-toggler i:last-child {
        opacity: 1;
    }


    .chatbot {
        position: fixed;
        right: 40px;
        bottom: 100px;
        width: 420px;
        background: #0a192f;
        z-index: 99;
        transform: scale(0.5);
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
        transform-origin: bottom right;
        transition: all 0.3s ease;
    }

    .show-chatbot .chatbot {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }

   
    .chatbot .header {
        padding: 16px 0;
        text-align: center;
        border-bottom-right-radius: 5px;
        border-bottom-left-radius: 5px;
        position: relative;
    }

    .chatbot .header h2 {
        color: #1a1a1a;
        font-size: 1.4rem;
        font-weight: 500;
    }

    .chatbot .header i {
        position: absolute;
        right: 20px;
        top: 50%;
        color: #0a192f;
        cursor: pointer;
        transform: translateY(-50%);
        font-size: 1.4rem;
        display: none;
    }

    .chatbot .chatbox {
        height: 510px;
        overflow-y: auto;
        padding: 25px 20px 100px;
    }

    .chatbot .chat {
        display: flex;
    }

    .chatbot .incoming i {
        height: 32px;
        width: 32px;
        font-size: 1.3rem;
       color: #c5a059;
       margin: 0 7px 7px 0;
        
    }

    .chatbot .outgoing {
        margin: 20px 0;
        justify-content: flex-end;
    }

    .chatbot .chat p {
        border-radius: 10px 10px 0 10px;
        max-width: 75%;
        white-space: pre-wrap;
        padding: 12px 16px;
        color: #c5a059;
        font-size: 0.95rem;
    }

    .chatbot .chat p.error {
       color: #721c24;
       background: #f8d7da;
    }

    .chatbot .outgoing p {
        border: 1px solid #c5a059;
        background: #181818;
    }

    .chatbot .incoming p {
        color: #1a1a1a;
        border-radius: 0px 10px 10px 10px;
        background: #c5a059;
    }

    .chatbot .chat-input {
        position: absolute;
        bottom: 0;
        width: 100%;
        display: flex;
        gap: 5px;
        background: #f0f0f0;
        border-top: 1px solid #c5a059;
        padding: 5px 20px;
    }

    .chat-input textarea {
        height: 55px;
        width: 100%;
        border: none;
        outline: none;
        font-size: 1rem;
        background: transparent;
        resize: none;
        padding: 15px 15px 16px 0;
        color: #0a192f;
        max-height: 180px;
    }

    .chat-input i {
        align-self: flex-end;
        height: 55px;
        line-height: 55px;
        color: #c5a059;
        cursor: pointer;
        font-size: 1.25rem;
        padding-right: 5px;
        visibility: hidden;
    }

    .chat-input textarea:valid ~ i {
        visibility: visible;
    }

    @media (max-width: 500px) {
        .chatbot {
            right: 0;
            bottom: 0;
            width: 100%;
            height: 91%;
            border-radius: 0;
        }

        .chatbot .chatbox {
            height: 90%;
        }

        /* 1. When the chatbot is OPEN (show-chatbot class is active) */
        body.show-chatbot .chatbot-toggler {
            background: transparent !important; /* Removes the yellow circle */
            box-shadow: none !important;        /* Removes the circle shadow */
        }

        /* 2. Keep the first icon (comment) visible and hide the last icon (x-mark) */
        body.show-chatbot .chatbot-toggler i:first-child {
            display: block; /* Ensures the comment icon stays */
        }

        body.show-chatbot .chatbot-toggler i:last-child {
            display: none;  /* Specifically removes the X icon */
        }

        .chatbot .header i  {
            display: block;
        }
    }
