.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-upload {
    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-upload:hover {
    background-color: var(--primary-color);
    text-decoration: none;
    color: #fff;
}

.url-button-upload:active {
    background-color: var(--primary-color);
}

.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;
	padding-top: 15px;
    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: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

#ai-live-chat-messages {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-bubble-container {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    min-width: 0;
    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;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-bubble a,
.chat-bubble p,
.chat-bubble span,
.chat-bubble div {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.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;
}

.ai-loading-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai-loading-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.ai-loading-time {
    font-size: 12px;
    font-weight: 600;
    color: #8a8f98;
    line-height: 1;
}

.loading-feedback {
    justify-content: flex-start;
}

.loading-elapsed-time {
    color: #8a8f98;
}

.ai-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b8bec6;
    animation: aiLoadingWave 1.15s ease-in-out infinite;
}

.ai-loading-dot:nth-child(2) {
    animation-delay: 0.14s;
}

.ai-loading-dot:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes aiLoadingWave {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@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,
    #ai-live-chat-find-address {
        width: 50px;
        height: 50px;
    }

    #ai-live-chat-new-message svg,
    #ai-live-chat-send svg,
    #ai-live-chat-find-address svg {
        width: 26px;
        height: 26px;
    }
}

@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.html');
    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;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.feedback-elapsed-time {
    font-size: 12px;
    font-weight: 600;
    color: #8a8f98;
    line-height: 1;
}

.feedback-icon {
    cursor: pointer;
    margin-left: 0;
    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;
}

/* ==================== PRODUCT CARDS STYLES ==================== */

.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    flex: 0 0 260px;
    min-width: 260px;
    height: auto;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.product-card.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover-color) 100%);
    border-color: var(--primary-color);
    color: #ffffff;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card.selected::before {
    opacity: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* margin-bottom: 12px; */
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.product-card.selected .product-name {
    color: #ffffff;
}

.product-badge {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: none;
}

.product-card.selected .product-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
}

.product-details {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    /* margin-bottom: 12px; */
    flex: 1;
}

.product-detail-item {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 0;
    gap: 8px;
}

.product-card.selected .product-detail-item {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.product-detail-label {
    font-weight: 600;
    color: #555;
    flex: 0 0 auto;
}

.product-card.selected .product-detail-label {
    color: rgba(255, 255, 255, 0.9);
}

.product-detail-value {
    text-align: right;
    font-weight: 500;
    flex: 1;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    /* margin-bottom: 12px; */
    text-align: center;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.product-card.selected .product-price {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.product-button {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.product-button:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: scale(1.02);
}

.product-card.selected .product-button {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-color: #ffffff;
}

.product-card.selected .product-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Responsive untuk mobile */
@media screen and (max-width: 480px) {
    .products-container {
        gap: 10px;
        padding-right: 5px;
    }

    .product-card {
        padding: 12px;
        flex: 0 0 200px;
        min-width: 200px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }
}

/* ==================== PROMO CARDS STYLES ==================== */
.promos-container {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 10px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 1, 0.3) transparent;
    box-sizing: border-box;
}

.promos-container::-webkit-scrollbar {
    height: 6px;
}

.promos-container::-webkit-scrollbar-track {
    background: transparent;
}

.promos-container::-webkit-scrollbar-thumb {
    background:rgba(255, 107, 1, 0.3);
    border-radius: 3px;
}

.promos-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 1, 0.5);
}

.promo-card {
    background: linear-gradient(135deg, #fdf5f1 0%, #fdf5f1 100%);
    border: 2px solid #ff6b01;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 1, 0.1);
    position: relative;
    overflow: hidden;
    flex: 0 0 260px;
    min-width: 260px;
    height: auto;
    min-height: 250px;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.promo-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(255, 107, 1, 0.2);
    transform: translateY(-2px);
}

.promo-card.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover-color) 100%);
    border-color: var(--primary-color);
    color: #ffffff;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.promo-card:hover::before {
    opacity: 1;
}

.promo-card.selected::before {
    opacity: 1;
}

.promo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.promo-kicker {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    line-height: 1.15;
    margin: 0;
}

.promo-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
}

.promo-card.selected .promo-title {
    color: #ffffff;
}

.promo-card.selected .promo-kicker {
    color: #ffffff;
}

.promo-badge {
    font-size: 18px;
    display: inline-block;
}

.promo-discount {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255, 107, 1, 0.1);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.promo-card.selected .promo-discount {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.promo-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.promo-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.promo-card.selected .promo-description {
    color: rgba(255, 255, 255, 0.9);
}

.promo-detail-item {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0e8e0;
    padding-bottom: 6px;
}

.promo-card.selected .promo-detail-item {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.promo-detail-label {
    font-weight: 600;
    color: #555;
}

.promo-card.selected .promo-detail-label {
    color: rgba(255, 255, 255, 0.9);
}

.promo-detail-value {
    text-align: right;
    font-weight: 500;
}

.promo-button {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.promo-button:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: scale(1.02);
}

.promo-card.selected .promo-button {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-color: #ffffff;
}

/* Card Container Styles */
#ai-live-chat-cards-container {
    display: none;
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

#ai-live-chat-cards-container.hidden {
    display: none !important;
}

#ai-live-chat-cards-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.products-container,
.promos-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
}

#ai-live-chat-conversation.cards-mode .ai-live-chat-body {
    display: none;
}

#ai-live-chat-conversation.cards-mode #ai-live-chat-cards-container {
    display: block !important;
    flex: 1;
}

.products-container::-webkit-scrollbar,
.promos-container::-webkit-scrollbar {
    height: 6px;
}

.products-container::-webkit-scrollbar-track,
.promos-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.products-container::-webkit-scrollbar-thumb,
.promos-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.products-container::-webkit-scrollbar-thumb:hover,
.promos-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.promo-card.selected .promo-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Responsive untuk mobile */
@media screen and (max-width: 480px) {
    .promos-container {
        gap: 10px;
        padding-right: 5px;
    }

    .promo-card {
        padding: 12px;
        flex: 0 0 200px;
        min-width: 200px;
        min-height: 210px;
    }

    .promo-kicker {
        font-size: 19px;
    }

    .promo-title {
        font-size: 16px;
    }

    .promo-discount {
        font-size: 14px;
    }
}
/* ==================== VISUAL REVAMP ==================== */

/* Floating launcher icon: subtle pulsing ring so it catches the eye */
.ai-live-chat-icon {
    background: var(--primary-gradient);
    box-shadow: 0 4px 18px var(--chat-shadow-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ai-live-chat-icon:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 22px var(--chat-shadow-color);
}

.ai-live-chat-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--chat-shadow-color);
    animation: aiLiveChatPulseRing 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes aiLiveChatPulseRing {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 1, 0.45); }
    70% { box-shadow: 0 0 0 14px rgba(255, 107, 1, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 1, 0); }
}

/* Widget entrance animation */
.ai-live-chat-widget {
    background-color: #f4f4f6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    opacity: 0;
}

.ai-live-chat-widget.show {
    opacity: 1;
}

/* Only add the scale/slide-up entrance on desktop; mobile keeps its own
   bottom-sheet transform animation defined earlier in this file. */
@media screen and (min-width: 769px) {
    .ai-live-chat-widget {
        transform: translateY(16px) scale(0.98);
    }

    .ai-live-chat-widget.show {
        transform: translateY(0) scale(1);
    }
}

/* Header: gradient + status line */
.ai-live-chat-header {
    background: var(--primary-gradient);
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    height: 60px;
}

.ai-live-chat-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ai-live-chat-header-info h3 {
    line-height: 1.2;
}

.ai-live-chat-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.ai-live-chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #3ddc84;
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
    animation: aiLiveChatStatusDot 1.8s ease-in-out infinite;
    display: inline-block;
}

@keyframes aiLiveChatStatusDot {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
    70% { box-shadow: 0 0 0 6px rgba(61, 220, 132, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* Message bubbles: a touch more polish */
.chat-bubble {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    animation: aiLiveChatBubbleIn 0.25s ease;
}

.chat-bubble.user {
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px var(--chat-shadow-color);
}

@keyframes aiLiveChatBubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Slimmer, nicer scrollbar for the conversation body */
.ai-live-chat-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 1, 0.3) transparent;
}

.ai-live-chat-body::-webkit-scrollbar {
    width: 5px;
}

.ai-live-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 1, 0.3);
    border-radius: 3px;
}

/* Find-address button next to the message field */
#ai-live-chat-find-address {
    background-color: transparent;
    color: var(--primary-hover-color);
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: color 0.3s ease, transform 0.2s ease;
}

#ai-live-chat-find-address:hover {
    color: var(--primary-color);
    transform: scale(1.08);
}

#ai-live-chat-find-address svg {
    width: 22px;
    height: 22px;
}

#ai-live-chat-send:hover,
#ai-live-chat-new-message:hover {
    transform: scale(1.08);
}

/* ==================== ADDRESS SEARCH WIDGET ==================== */

.address-search-chat-bubble {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
}

.address-search-widget {
    background: #ffffff;
    border: 1px solid #f0e2d6;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(255, 107, 1, 0.12);
    padding: 14px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    animation: aiLiveChatBubbleIn 0.3s ease;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.address-search-bubble.address-search-selected .address-search-widget {
    opacity: 0.5;
    transform: scale(0.98);
}

.address-search-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.address-search-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    flex: 0 0 auto;
}

.address-search-heading-icon svg {
    width: 15px;
    height: 15px;
}

.address-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f7f5f3;
    border: 1.5px solid #ece5de;
    border-radius: 12px;
    padding: 0 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.address-search-input-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
    background-color: #ffffff;
}

.address-search-input-icon {
    width: 16px;
    height: 16px;
    color: #a3a3a3;
    flex: 0 0 auto;
}

.address-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 10px 8px;
    font-size: 13.5px;
    color: #333;
    min-width: 0;
}

.address-search-clear {
    border: none;
    background: #e2ddd8;
    color: #666;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.address-search-clear:hover {
    background: #d2ccc5;
}

.address-search-results {
    margin-top: 10px;
    max-height: 220px;
    overflow-y: auto;
}

.address-search-hint,
.address-search-empty {
    font-size: 12px;
    color: #8a8f98;
    line-height: 1.5;
    padding: 6px 2px;
}

.address-search-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #8a8f98;
    padding: 8px 2px;
}

.address-search-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #f0e2d6;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
    display: inline-block;
    flex: 0 0 auto;
}

.address-result-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-result-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 8px;
    cursor: pointer;
    transition: none !important;
}

.address-result-item:hover, .address-result-item:focus-visible {
    border-radius: 10px !important;
    -webkit-border-radius: 10px !important;
    background-color: var(--primary-color-light);
    /* border-radius: 0; */
}


.address-result-item:active {
    transform: scale(0.98);
}

.address-result-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex: 0 0 auto;
    margin-top: 2px;
}

.address-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.address-result-main {
    font-size: 12.5px;
    font-weight: 600;
    color: #333;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.address-result-sub {
    font-size: 11px;
    color: #8a8f98;
    line-height: 1.3;
}

@media screen and (max-width: 480px) {
    .address-search-widget {
        max-width: 100%;
    }
}
