.url-button {
    display: block; 
    width: 100%; 
    padding: 5px 15px;
    background-color: var(--primary-hover-color);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-bottom: 10px;
    box-sizing: border-box;
    line-height: 1.1;
    margin-top: 10px;
}

.url-button:hover {
    background-color: var(--primary-color);
    text-decoration: none;
    color: #fff;
}

.url-button:active {
    background-color: var(--primary-color);
}

.ai-live-chat-icon {
    position: fixed;
    bottom: 2.5%;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.ai-live-chat-icon svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.ai-live-chat-widget {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 500px;
    background-color: #f0f0f0;
    border-radius: 20px 20px 10px 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transition: all 0.3s ease-in-out;
}

.ai-live-chat-header {
    background-color: var(--primary-color);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    color: #ffffff;
    border-radius: 20px 20px 0 0;
}

.ai-live-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

#ai-live-chat-close {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

#ai-live-chat-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.ai-live-chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

#ai-live-chat-messages {
    display: flex;
    flex-direction: column;
}

.chat-bubble-container {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    margin-bottom: 15px;
}

.chat-bubble-container.user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-bubble-container.ai {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-bubble-name {
    font-size: 12px;
    margin-bottom: 3px;
    opacity: 0.7;
}

.chat-bubble {
    padding: 10px;
    border-radius: 20px;
    word-wrap: break-word;
}

.chat-bubble.user {
    background-color: var(--primary-color);
    color: #ffffff;
    border-bottom-right-radius: 0;
}

.chat-bubble.ai {
    background-color: #ffffff;
    color: #333333;
    border-bottom-left-radius: 0;
}

.ai-live-chat-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.ai-live-chat-input {
    padding: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
}

.ai-live-chat-input-hidden {
    display: none;
}

#ai-live-chat-message {
    flex-grow: 1;
    margin-right: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    height: 40px;
    max-height: 40px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#ai-live-chat-message::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#ai-live-chat-new-message,
#ai-live-chat-send {
    background-color: transparent;
    color: var(--primary-hover-color);
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

#ai-live-chat-new-message:hover,
#ai-live-chat-send:hover {
    color: var(--primary-color);
}

#ai-live-chat-new-message svg,
#ai-live-chat-send svg {
    width: 24px;
    height: 24px;
}

.ai-live-chat-footer {
    padding: 10px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    height: 100%;
}

#switch-to-human {
    color: var(--primary-hover-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

#switch-to-human:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.chat-bubble-container .spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {
    .ai-live-chat-widget {
        width: 100%;
        height: calc(100% - 25%);
        bottom: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        top: auto;
        transform: translateY(100%);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .ai-live-chat-widget.show {
        transform: translateY(0);
    }

    .ai-live-chat-body {
        height: calc(100% - 170px);
    }

    .ai-live-chat-bottom {
        border-radius: 0;
    }

    #ai-live-chat-message {
        font-size: 16px;
    }

    #ai-live-chat-new-message,
    #ai-live-chat-send {
        width: 50px;
        height: 50px;
    }

    #ai-live-chat-new-message svg,
    #ai-live-chat-send svg {
        width: 30px;
        height: 30px;
    }
}

@media screen and (max-width: 480px) {
    .ai-live-chat-icon {
        width: 50px;
        height: 50px;
        bottom: 2.5%;
        right: 10px;
    }

    .ai-live-chat-icon svg {
        width: 25px;
        height: 25px;
    }
}

/*updated css*/
.ai-live-chat-back {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 0 10px;
}

.ai-live-chat-thread-list {
    padding: 20px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

#thread-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#thread-list li {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#thread-list li:hover {
    background-color: #e0e0e0;
}

#new-conversation-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#new-conversation-btn:hover {
    background-color: var(--primary-hover-color);
}

.ai-live-chat-conversation {
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
}

/* New styles for the conversation list */
.ai-live-chat-thread-list {
    padding: 10px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

#ai-thread-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.ai-conv-img {
    position: relative;
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.ai-conv-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ai-conv-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    border: 2px solid white;
}

.ai-conv-content {
    flex-grow: 1;
    overflow: hidden;
}

.ai-conv-name {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: #333333;
}

.ai-conv-message {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666666;
    padding-bottom: 0px;
}

.ai-conv-info {
    font-size: 0.8em;
    color: #888888;
    text-align: right;
}

.ai-conv-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('path/to/chat-icon.png');
    background-size: cover;
    margin-left: 5px;
}

#ai-new-conversation-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#ai-new-conversation-btn:hover {
    background-color: var(--primary-hover-color);
}

/* Update existing styles */
.ai-live-chat-back {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 0 10px;
}

.ai-live-chat-conversation {
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
}

.ai-live-chat-thread-list {
    padding: 10px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

#ai-thread-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.ai-conv-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

.ai-conv-item:hover {
    background-color: #f5f5f5;
}

.ai-conv-img {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.ai-conv-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ai-conv-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    border-radius: 50%;
    border: 2px solid white;
}

.ai-conv-content {
    flex-grow: 1;
    overflow: hidden;
}

.ai-conv-name {
    font-weight: bold;
    margin-bottom: 3px;
    display: block;
    color: #333333;
}

.ai-conv-info {
    position: absolute;
    top: 5px;
    right: 10px;
}

.ai-conv-age {
    font-size: 0.7em;
    color: #888888;
}

#ai-new-conversation-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#ai-new-conversation-btn:hover {
    background-color: var(--primary-hover-color);
}

/* Update existing styles */
/* .ai-live-chat-back {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 10px;
    position: relative;
    transition: color 0.3s ease;
} */

.ai-live-chat-back {
    /* background-color: rgba(255, 255, 255, 0.2); */
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.ai-live-chat-back:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.ai-live-chat-conversation {
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
}

/* Media queries */
@media screen and (max-width: 768px) {
    .ai-live-chat-thread-list {
        height: calc(100% - 60px);
    }
}

/*Feedback CSS*/
.feedback-icons {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

.feedback-icon {
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.feedback-icon:hover {
    opacity: 1;
}

.feedback-icon.selected {
    opacity: 1;
}

.feedback-icon svg {
    width: 20px;
    height: 20px;
}

.feedback-icon[data-feedback="positive"]:hover svg,
.feedback-icon[data-feedback="positive"].selected svg {
    color: #4CAF50; /* Green color for thumbs up */
}

.feedback-icon[data-feedback="negative"]:hover svg,
.feedback-icon[data-feedback="negative"].selected svg {
    color: #F44336; /* Red color for thumbs down */
}

.feedback-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.feedback-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    position: relative; /* Add this */
}

.close-modal {
    color: #aaa;
    position: absolute; /* Change to absolute positioning */
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.feedback-modal-content h2 {
    font-size: 18px; /* Reduce the size of the heading */
    margin-top: 0;
    margin-bottom: 15px;
}

#feedback-text {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box; /* Add this */
}

#submit-feedback {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
    margin-top: 10px; /* Add some top margin */
}

#submit-feedback:hover {
    background-color: var(--primary-hover-color);
}

/* Add this new rule to clear the float */
.feedback-modal-content::after {
    content: "";
    display: table;
    clear: both;
}

.feedback-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feedback-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.feedback-icon-circle svg {
    width: 24px;
    height: 24px;
}

.feedback-icon-circle.positive {
    background-color: rgba(0, 128, 0, 0.1);
}

.feedback-icon-circle.negative {
    background-color: rgba(255, 0, 0, 0.1);
}

/* Update this existing style */
.feedback-modal-content h2 {
    font-size: 18px;
    margin: 0;
}