/* ------------------ Container ------------------ */
.avenue-messenger {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 2px 10px 40px rgba(22, 20, 19, 0.4);
    z-index: 9999;
    display: none; /* Hidden by default, shown with JS */
    flex-direction: column;
    overflow: visible;
    font-family: 'Urbanist', sans-serif;
    max-height: 550px;
}

.avenue-messenger {
    display: none;
}


/* ------------------ Header ------------------ */


/* 👇 Avatar floats above the chat box header */
.chat-title {
    background: #302861;
    border-bottom: 1px solid #ddd;
    padding: 60px 10px 10px; /* Space for logo */
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: visible; /* allow avatar to overflow */
    z-index: 1;
}

.chat-title figure.avatar {
    position: absolute;
    top: -40px; /* float above the chat title */
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding: 5px;
    z-index: 10;
}

.chat-title figure.avatar img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}



.chat-title h1 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    padding-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.chat-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.chat-controls span {
    cursor: pointer;
    font-size: 18px;
    color: #fff;
}

/* ------------------ Chat Area ------------------ */
/* Message Area */

/*.messages {*/
/*    flex: 1 1 auto;*/
/*    overflow-y: auto;*/
/*    padding: 15px;*/
/*}*/
.messages {
  flex: 1;
  overflow-y: auto;
  max-height: 400px; /* or whatever works for your design */
}

.messages-content {
    display: flex;
    flex-direction: column;
}


/* Messages */

.message {
    max-width: 75%;
    margin: 6px 0;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    background: #f0f0f0;
    color: #333;
    align-self: flex-start;
}
.message.new {
    margin-left: 45px !important;
    border-radius: 20px 20px 20px 0px !important;
}
.message-personal {
    background: #cf171f;
    color: #fff;
    align-self: flex-end;
    border-radius: 20px 20px 0 20px;
}
.messages .message {
    background: #f0f0f0;
    color: #000;
    font-size: 14px;
    font-family:'Urbanist';
    font-weight:500;
    letter-spacing:0.5px;
    padding: 10px 15px;
    border-radius: 15px;
    margin: 10px 0;
    display: inline-block;
    max-width: 85%;
    margin-right:10px;
    margin-left:10px;
}
.message.message-personal {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 15px 15px 0 15px;
    float: right;
    padding: 10px 15px;
    margin-right: 45px; 
}

.timestamp {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.message .timestamp {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    text-align: right;
}

/* Avatar beside each message */
.message figure.avatar {
    position: absolute;
    bottom: -18px;
    left: -40px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
}

.message.message-personal figure.avatar {
    left: auto;
    right: -40px;
    bottom: -18px;
}

.message figure.avatar img {
    width: 100%;
    height: auto;
}

/* ------------------ Input Box ------------------ */
.message-box {
    display: flex;
    padding: 10px;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
    align-items: center;
    justify-content: center;
    border-radius:0 0 20px 20px;
}

.message-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 50px 0 0 50px; /* round left side */
    border: 1px solid #ccc;
    font-size: 14px;
    font-weight:500;
    outline: none;
    height:50px;
    resize: none;
    border-right: none; /* seamless join with button */
    overflow:hidden;
}

.message-submit {
    background: #cf171f;
    color: white;
    border: none;
    padding: 10px 16px;
     border-radius: 0 50px 50px 0; /* round right side */
    padding: 0 20px;
    cursor: pointer;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-submit:hover {
    background: #302861;
}

.custom-dropdown {
    width: 200px; /* Adjust width */
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/*------------------- Buttons--------------------------*/
/* Container for buttons to display horizontally */
.message .button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between buttons */
    margin-top: 10px;
}

/* Style for each button */
.message .button-18 {
    background-color: #092582;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    font-size: 12px;
    font-weight:600;
    width: auto;
    min-width: 100px;
    text-align: center;
    margin: 3px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect for buttons */
.message .button-18:hover {
    background-color: #0f3cd0; /* Darker green on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}




/* ------------------ Launcher Button ------------------ */
 .agent-wrapper {
            position: fixed;
            bottom: 20px;
            right: 20px;
            display: flex;
             flex-direction: column; /* Stack text under the agent face */
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            cursor: pointer;
            z-index: 1000;
        }

.agent-face_1 {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    cursor: pointer;
    transition: 0.3s;
}

.agent-face_1 .circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
/*     border: 2px solid #ce171f; */
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    overflow: hidden;
}

.agent-face_1 .circle img {
    width: 100%;
   /* height: 100%;*/
    object-fit: cover;
}
.avenue-messenger.show + .agent-face_1 {
    display: none !important;
}

/* ------------------ Animation ------------------ */
.agent-face_1 {
    animation: floatbot-alive 3s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

@keyframes floatbot-alive {
    0%   { transform: translateY(0) scale(1); }
    20%  { transform: translateY(-5px) scale(1.03, 0.97); }
    40%  { transform: translateY(0) scale(0.97, 1.03); }
    60%  { transform: translateY(-3px) scale(1.02, 0.98); }
    80%  { transform: translateY(0) scale(0.98, 1.02); }
    100% { transform: translateY(0) scale(1); }
}
.agent-face_1:hover {
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.6);
    border-radius:50%
}
.agent-text {
    background-color: #302861;
    color: #fff;
    padding: 10px 70px 10px 40px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #ffffff;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-3px, -5px) !important;
    animation: slideInText 0.8s ease forwards 1.2s;
    /* max-width: 200px; */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
 @keyframes slideInText {
 to {
      opacity: 1;
      transform: translateX(0);
    }
 }



@keyframes bounce {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}


/* ------------------ Utilities ------------------ */
.messages img {
    max-width: 220px;
    height: auto;
    border-radius: 10px;
}

.chat_readmore {
    display: flex;
    justify-content: space-between;
    padding-top: 5px;
}

.chat_readmore a {
    color: #337ab7;
    font-weight: bold;
    text-decoration: none;
}

/* ------------------ Responsive ------------------ */
@media (max-width: 767px) {
.agent-wrapper {
            bottom: 95px;
            right: 30px;
        }

.agent-face_1 {
    bottom: 95px;
    right: 30px;    
    }

}
@media (max-width: 480px) {
    width: 350px;
    height: auto; /* Set height to auto to allow it to expand with content */
    min-height: 300px; /* Set a minimum height */
    max-height: none !important;
    left: 20px;
    bottom: 75px;
    /*overflow: auto; /* Allows scrolling if content overflows */
}
  .chat-title {
        padding-top: 45px;
    }
  

