/* ================================
   MAIN CONTAINER & POSITIONING
   ================================ */
#custom-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    color: #4d4d4d;
    font-family: 'Rb-regular', Helvetica, Arial, sans-serif;
    font-size: 14px;
}

/* ================================
   FLOATING CHAT ICON
   ================================ */
.chatbot-icon {
    background-color: #ff0d00;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 35% / 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: all 0.2s ease-out;
}
.chatbot-icon:hover {
    transform: scale(1.1);
}
.chatbot-icon.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* ================================
   CHAT WINDOW
   ================================ */
.chatbot-window {
    width: 360px;
    max-width: 90vw;
    height: 600px;
    background-color: #ffffff;
    /* border: 1px solid #e0e0e0; */
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 0;
    right: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}
.chatbot-window.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* ================================
   CHAT HEADER
   ================================ */
.chatbot-header {
    background-color: #ff0d00;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    flex-wrap: wrap
}
.chatbot-header-text{
    width: 100%;
    border-top: 1px solid rgb(255 255 255 / 50%);
        padding-top: 6px;
}
.chat_header{
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
}
.chatbot-logo img {
    height: 25px;
    display: block;
}
.chatbot-header-text {
    flex-grow: 1;
}
.chatbot-title {
    font-weight: bold;
    font-size: 1.1em;
}
.chatbot-subtitle {
        text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 1.2px;
}
.chatbot-close {
    background: rgba(0,0,0,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
}
.chatbot-close:hover {
    background: rgba(0,0,0,0.4);
}

/* ================================
   CHAT BODY
   ================================ */
.chatbot-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: #ffffff;
        display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.chatbot-message.sent{
        background-color: #cccccc;
    color: #4d4d4d;
    border-top-right-radius: 0;
    font-size: 14px;
}
.chatbot-message-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ff0d00;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    font-size: 16px;
}
.chatbot-sender-name {
    font-size: 12px;
    font-weight: bold;
    color: #3d3d3d;
    margin-bottom: 5px;
}
.chatbot-message {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.45;
    word-wrap: break-word;
    color: #4d4d4d;
    font-size: 14px;
}
.chatbot-message.received {
    background-color: #f0f0f0;
    color: #4d4d4d;
    border-top-left-radius: 0;
    font-size: 14px;
}
.chatbot-message strong {
    color: #222;
    font-weight: 700;
}
.chatbot-message a {
    color: #0066cc;
    text-decoration: underline;
}

.chatbot-card.order-detail-card {
    max-width: 320px;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.45;
    color: #555;
}

.chatbot-card.order-detail-card p {
    margin: 0 0 7px;
}

.chatbot-section-title {
    color: #222;
    font-size: 12px;
    line-height: 1.35;
    margin: 9px 0 6px;
}

.chatbot-order-list {
    margin: 0;
    padding-left: 16px;
}

.chatbot-order-list li {
    margin-bottom: 6px;
}

.chatbot-tracking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chatbot-tracking-list li {
    margin-bottom: 6px;
}

.chatbot-tracking-list span {
    font-weight: 700;
}

.chatbot-order-note {
    color: #555;
}

/* ================================
   CHAT FOOTER (FIXED & FINALIZED)
   ================================ */
.chatbot-footer {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #ffffff;
    flex-shrink: 0;
    gap: 10px;
}

.chatbot-upload-icon {
    display: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #ff0d00;
    transition: background-color 0.3s;
}
.chatbot-upload-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}
.chatbot-upload-icon:hover {
    background-color: #ff0d00;
}
/* .chatbot-upload-icon:hover svg {
    fill: #000;
} */

.chatbot-options{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.chatbot-options button{
    border: 1px solid #000;
    font-size: 14px;
}

.chatbot-go-back-wrap {
    display: flex;
    margin-top: 4px;
}

.chatbot-go-back-btn {
    background: transparent;
    border: 1px solid #000;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    padding: 7px 14px;
}

.chatbot-go-back-btn:hover {
    background: #fff;
}

.chatbot-form {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-input {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: #fff;
        font-size: 12px !important;
}

.chatbot-input::placeholder {
    color: #999;
}

.chatbot-send {
    background: #ff0d00;
    border-radius: 50%;
    width: 43.7px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
}

.chatbot-send svg{
    fill: #fff!important;
}

.chatbot-send:hover {
    background-color: #ff0d00;
}

.chatbot-send svg {
    fill: #555;
    width: 22px;
    height: 22px;
}



/* Chatbot Product Slider Styles */
.chatbot-product-slider {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #ccc #f1f1f1;
    flex-wrap: nowrap;
    gap: 12px;
}

/* For Chrome, Safari, and Opera */
.chatbot-product-slider::-webkit-scrollbar {
    height: 6px;
}
.chatbot-product-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.chatbot-product-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 6px;
}
.chatbot-product-slider::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.chatbot-product-card {
    flex: 0 0 132px;
    width: 132px;
    border: 1px solid #ededed;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.chatbot-product-card:hover {
    transform: translateY(-3px);
}

.chatbot-product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.chatbot-product-image-wrap {
    width: 100%;
    height: 92px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-product-image {
    width: 92%;
    height: 92%;
    object-fit: contain;
    display: block;
}

.chatbot-product-details {
    padding: 8px;
}

.chatbot-product-name {
    color: #333;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    height: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.chatbot-product-sku {
    color: #777;
    font-size: 10px;
    line-height: 1.25;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatbot-product-price {
    font-size: 13px;
    font-weight: bold;
    color: #ff0d00;
    margin-bottom: 4px;
}

.chatbot-product-stock {
    display: block;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.chatbot-product-stock.in-stock {
    color: #208a3b;
}

.chatbot-product-stock.out-of-stock {
    color: #c62828;
}

/* Typing Indicator */
.chatbot-typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.chatbot-typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #9E9E9E;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}
.chatbot-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}



.chatbot-input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 5px;
}

.chatbot-submit {
    background: #673AB7;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.chatbot-submit:hover {
    background: #512DA8;
}

/* Strong chatbot typography overrides. Scoped to avoid touching site styles. */
#custom-chatbot-container,
#custom-chatbot-container * {
    font-family: 'Rb-regular', Helvetica, Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

#custom-chatbot-container .chatbot-message {
    color: #555 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

#custom-chatbot-container .chatbot-message.received {
    color: #555 !important;
    font-size: 13px !important;
}

#custom-chatbot-container .chatbot-message.sent {
    color: #4f4f4f !important;
    font-size: 13px !important;
}

#custom-chatbot-container .chatbot-message strong,
#custom-chatbot-container .chatbot-section-title strong,
#custom-chatbot-container .chatbot-tracking-list span {
    color: #202020 !important;
    font-weight: 700 !important;
}

#custom-chatbot-container .order-detail-card {
    color: #5b5b5b !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

#custom-chatbot-container .order-detail-card p,
#custom-chatbot-container .order-detail-card li,
#custom-chatbot-container .chatbot-tracking-list li {
    color: #5b5b5b !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

#custom-chatbot-container .chatbot-section-title {
    color: #202020 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 10px 0 6px !important;
}

#custom-chatbot-container .chatbot-order-list {
    padding-left: 18px !important;
}

#custom-chatbot-container .chatbot-order-list li {
    margin-bottom: 7px !important;
}

#custom-chatbot-container .chatbot-btn,
#custom-chatbot-container .chatbot-go-back-btn,
#custom-chatbot-container .chatbot-input {
    font-family: 'Rb-regular', Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
}

#custom-chatbot-container .chatbot-product-name,
#custom-chatbot-container .chatbot-product-sku,
#custom-chatbot-container .chatbot-product-price,
#custom-chatbot-container .chatbot-product-stock {
    font-family: 'Rb-regular', Helvetica, Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

/* Professional Ray-Ban support UI refresh. */
#custom-chatbot-container {
    right: 24px;
    bottom: 24px;
    color: #1f1f1f;
    font-size: 13px;
}

#custom-chatbot-container,
#custom-chatbot-container * {
    box-sizing: border-box;
}

#custom-chatbot-container .chatbot-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff0d00;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

#custom-chatbot-container .chatbot-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

#custom-chatbot-container .chatbot-window {
    width: 380px;
    height: 560px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    background: #fff;
}

#custom-chatbot-container .chatbot-header {
    background: #111;
    color: #fff;
    padding: 14px 16px 12px;
    gap: 8px;
}

#custom-chatbot-container .chat_header {
    align-items: center;
    flex-wrap: nowrap;
}

#custom-chatbot-container .chatbot-logo img {
    height: 22px;
    filter: brightness(0) invert(1);
}

#custom-chatbot-container .chatbot-header-text {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 8px;
}

#custom-chatbot-container .chatbot-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px !important;
    line-height: 1.3;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

#custom-chatbot-container .chatbot-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 20px;
    line-height: 24px;
}

#custom-chatbot-container .chatbot-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

#custom-chatbot-container .chatbot-body {
    display: block;
    padding: 16px;
    background: #f7f7f7;
    gap: 0;
}

#custom-chatbot-container .chatbot-message-group {
    width: 100%;
    gap: 8px;
    margin-bottom: 12px;
}

#custom-chatbot-container .chatbot-message-group:not(.received) {
    justify-content: flex-end;
}

#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-avatar,
#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-sender-name {
    display: none;
}

#custom-chatbot-container .chatbot-message-content {
    max-width: 82%;
}

#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-message-content {
    max-width: 78%;
}

#custom-chatbot-container .chatbot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111;
    overflow: hidden;
}

#custom-chatbot-container .chatbot-avatar img {
    width: 28px !important;
    height: 28px;
    object-fit: contain;
    padding: 4px;
    border-radius: 50% !important;
    background: #111;
}

#custom-chatbot-container .chatbot-sender-name {
    margin: 0 0 4px;
    color: #666;
    font-size: 11px;
    font-weight: 400;
}

#custom-chatbot-container .chatbot-message {
    border-radius: 8px !important;
    padding: 10px 12px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

#custom-chatbot-container .chatbot-message.received {
    background: #fff;
    border: 1px solid #e7e7e7;
    color: #282828 !important;
}

#custom-chatbot-container .chatbot-message.sent {
    background: #111;
    color: #fff !important;
    border: 1px solid #111;
}

#custom-chatbot-container .chatbot-message.sent * {
    color: #fff !important;
}

#custom-chatbot-container .chatbot-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

#custom-chatbot-container .chatbot-btn,
#custom-chatbot-container .chatbot-go-back-btn {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d4d4d4 !important;
    border-radius: 6px;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 13px !important;
    line-height: 1.25;
    padding: 9px 12px;
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

#custom-chatbot-container .chatbot-btn:hover,
#custom-chatbot-container .chatbot-go-back-btn:hover {
    border-color: #111 !important;
    background: #111;
    color: #fff;
}

#custom-chatbot-container .chatbot-footer {
    padding: 12px;
    border-top: 1px solid #e2e2e2;
    background: #fff;
}

#custom-chatbot-container .chatbot-form {
    gap: 8px;
}

#custom-chatbot-container .chatbot-input {
    height: 40px;
    margin: 0;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-size: 13px !important;
    padding: 0 12px;
}

#custom-chatbot-container .chatbot-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

#custom-chatbot-container .chatbot-send {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 0;
    border-radius: 6px;
    background: #ff0d00;
}

#custom-chatbot-container .chatbot-send:hover {
    background: #c90b00;
}

#custom-chatbot-container .chatbot-card {
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

#custom-chatbot-container .chatbot-card.warning {
    border-color: #f0d0cc;
    background: #fff8f7;
    color: #7b1f16 !important;
}

#custom-chatbot-container .chatbot-product-slider {
    gap: 10px;
    padding: 10px 0 2px;
}

#custom-chatbot-container .chatbot-product-card {
    flex-basis: 142px;
    width: 142px;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    box-shadow: none;
}

#custom-chatbot-container .chatbot-product-card:hover {
    transform: none;
    border-color: #111;
}

#custom-chatbot-container .chatbot-product-image-wrap {
    height: 100px;
    background: #fff;
}

#custom-chatbot-container .chatbot-product-price {
    color: #111;
}

#custom-chatbot-container .chatbot-typing-indicator span {
    background-color: #111;
}

@media (max-width: 480px) {
    #custom-chatbot-container {
        right: 12px;
        bottom: 12px;
    }

    #custom-chatbot-container .chatbot-window {
        width: calc(100vw - 24px);
        height: min(560px, calc(100vh - 24px));
    }

    #custom-chatbot-container .chatbot-body {
        padding: 12px;
    }

    #custom-chatbot-container .chatbot-message-content,
    #custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-message-content {
        max-width: 86%;
    }
}

/* Premium composer and option controls refresh. */
#custom-chatbot-container .chatbot-footer {
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

#custom-chatbot-container .chatbot-form {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: #f7f7f7;
}

#custom-chatbot-container .chatbot-input,
#custom-chatbot-container input.chatbot-input {
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #111 !important;
    font-size: 13px !important;
    line-height: 36px !important;
    box-shadow: none !important;
    outline: none !important;
}

#custom-chatbot-container .chatbot-form:focus-within {
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

#custom-chatbot-container .chatbot-input::placeholder {
    color: #777;
    opacity: 1;
}

#custom-chatbot-container .chatbot-send,
#custom-chatbot-container button.chatbot-send {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #ff0d00 !important;
    box-shadow: 0 4px 10px rgba(232, 12, 0, 0.25);
}

#custom-chatbot-container .chatbot-send:hover,
#custom-chatbot-container button.chatbot-send:hover {
    background: #c90b00 !important;
}

#custom-chatbot-container .chatbot-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

#custom-chatbot-container .chatbot-send svg {
    width: 20px !important;
    height: 20px !important;
    fill: #fff !important;
}

#custom-chatbot-container .chatbot-options {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

#custom-chatbot-container .chatbot-options .chatbot-btn,
#custom-chatbot-container .chatbot-btn,
#custom-chatbot-container button.chatbot-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 38px;
    border: 1px solid #d6d6d6 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    padding: 9px 10px !important;
    text-align: center !important;
    white-space: normal;
}

#custom-chatbot-container .chatbot-options .chatbot-btn:hover,
#custom-chatbot-container button.chatbot-btn:hover {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="track_order"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="product_search"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="rma_details"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="contact_agent"] {
    grid-column: 1 / -1;
}

#custom-chatbot-container .chatbot-message.received .chatbot-options {
    max-width: 100%;
}

@media (max-width: 480px) {
    #custom-chatbot-container .chatbot-footer {
        padding: 8px 10px 10px;
    }

    #custom-chatbot-container .chatbot-form {
        min-height: 44px;
    }

    #custom-chatbot-container .chatbot-send,
    #custom-chatbot-container button.chatbot-send {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }
}

/* Premium Ray-Ban chatbot finish. */
#custom-chatbot-container {
    right: 22px !important;
    bottom: 22px !important;
    z-index: 10000 !important;
    color: #161616 !important;
    font-family: 'Rb-regular', Helvetica, Arial, sans-serif !important;
}

#custom-chatbot-container .chatbot-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    background: #111 !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.30) !important;
}

#custom-chatbot-container .chatbot-icon svg {
    width: 25px !important;
    height: 25px !important;
}

#custom-chatbot-container .chatbot-window {
    width: 390px !important;
    height: 580px !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0,0,0,.14) !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.34) !important;
}

#custom-chatbot-container .chatbot-header {
    background: #0b0b0b !important;
    color: #fff !important;
    padding: 16px 18px 14px !important;
    border-radius: 14px 14px 0 0 !important;
}

#custom-chatbot-container .chat_header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

#custom-chatbot-container .chatbot-logo img {
    height: 23px !important;
}

#custom-chatbot-container .chatbot-header-text {
    width: 100% !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255,255,255,.14) !important;
}

#custom-chatbot-container .chatbot-subtitle {
    color: rgba(255,255,255,.72) !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    letter-spacing: .2px !important;
    text-transform: none !important;
}

#custom-chatbot-container .chatbot-close {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    background: rgba(255,255,255,.06) !important;
    color: #fff !important;
    font-size: 20px !important;
    line-height: 26px !important;
}

#custom-chatbot-container .chatbot-body {
    display: block !important;
    padding: 18px !important;
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f4 100%) !important;
}

#custom-chatbot-container .chatbot-message-group {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
}

#custom-chatbot-container .chatbot-message-group:not(.received) {
    justify-content: flex-end !important;
}

#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-avatar,
#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-sender-name {
    display: none !important;
}

#custom-chatbot-container .chatbot-message-content {
    max-width: 84% !important;
}

#custom-chatbot-container .chatbot-message-group:not(.received) .chatbot-message-content {
    max-width: 78% !important;
}

#custom-chatbot-container .chatbot-avatar {
    width: 30px !important;
    height: 30px !important;
    margin-top: 2px !important;
    border-radius: 50% !important;
    background: #111 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,.12) !important;
    overflow: hidden !important;
}

#custom-chatbot-container .chatbot-avatar img {
    width: 30px !important;
    height: 30px !important;
    padding: 5px !important;
    object-fit: contain !important;
    background: #111 !important;
    border-radius: 50% !important;
}

#custom-chatbot-container .chatbot-sender-name {
    margin: 0 0 5px !important;
    color: #505050 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

#custom-chatbot-container .chatbot-message {
    padding: 11px 13px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

#custom-chatbot-container .chatbot-message.received {
    background: #fff !important;
    border: 1px solid #ebebeb !important;
    color: #202020 !important;
}

#custom-chatbot-container .chatbot-message.sent {
    background: #111 !important;
    border: 1px solid #111 !important;
    color: #fff !important;
}

#custom-chatbot-container .chatbot-message.sent * {
    color: #fff !important;
}

#custom-chatbot-container .chatbot-options {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 13px !important;
}

#custom-chatbot-container .chatbot-options .chatbot-btn,
#custom-chatbot-container button.chatbot-btn {
    position: relative !important;
    width: 100% !important;
    min-height: 42px !important;
    border: 1px solid #dedede !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.03) !important;
    padding: 10px 28px 10px 12px !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

#custom-chatbot-container .chatbot-options .chatbot-btn::after {
    content: '›';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
    line-height: 1;
}

#custom-chatbot-container .chatbot-options .chatbot-btn:hover {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

#custom-chatbot-container .chatbot-options .chatbot-btn:hover::after {
    color: #fff;
}

#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="track_order"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="product_search"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="rma_details"],
#custom-chatbot-container .chatbot-options .chatbot-btn[data-action="contact_agent"] {
    grid-column: 1 / -1 !important;
}

#custom-chatbot-container .chatbot-footer {
    padding: 12px !important;
    background: #fff !important;
    border-top: 1px solid #e9e9e9 !important;
}

#custom-chatbot-container .chatbot-form {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 999px !important;
    background: #f6f6f6 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75) !important;
}

#custom-chatbot-container .chatbot-form:focus-within {
    border-color: #111 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17,17,17,.08) !important;
}

#custom-chatbot-container .chatbot-input,
#custom-chatbot-container input.chatbot-input {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 8px 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #111 !important;
    font-size: 13px !important;
    line-height: 38px !important;
}

#custom-chatbot-container .chatbot-input::placeholder {
    color: #7a7a7a !important;
    opacity: 1 !important;
}

#custom-chatbot-container .chatbot-send,
#custom-chatbot-container button.chatbot-send {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #ff0d00 !important;
    box-shadow: 0 7px 14px rgba(232,12,0,.28) !important;
}

#custom-chatbot-container .chatbot-send:hover,
#custom-chatbot-container button.chatbot-send:hover {
    background: #c70b00 !important;
}

#custom-chatbot-container .chatbot-send svg {
    width: 19px !important;
    height: 19px !important;
    fill: #fff !important;
}

@media (max-width: 480px) {
    #custom-chatbot-container {
        right: 10px !important;
        bottom: 10px !important;
    }

    #custom-chatbot-container .chatbot-window {
        width: calc(100vw - 20px) !important;
        height: min(580px, calc(100vh - 20px)) !important;
    }

    #custom-chatbot-container .chatbot-body {
        padding: 14px !important;
    }
}

#custom-chatbot-container .chatbot-logo {
    display: flex !important;
    align-items: center !important;
}

#custom-chatbot-container .chatbot-logo img {
    width: 64px !important;
    height: auto !important;
    max-height: 44px !important;
    display: block !important;
    object-fit: contain !important;
    filter: none !important;
    background: transparent !important;
}

/* Keep the bot avatar aligned with the Ray-Ban red logo. */
#custom-chatbot-container .chatbot-avatar,
#custom-chatbot-container .chatbot-avatar img {
    background: #ff0d00 !important;
}

/* Policy links inside chatbot. */
#custom-chatbot-container .chatbot-policy-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

#custom-chatbot-container .chatbot-policy-links a {
    position: relative;
    display: block;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fff;
    color: #111 !important;
    padding: 10px 28px 10px 12px;
    text-decoration: none !important;
    line-height: 1.25;
}

#custom-chatbot-container .chatbot-policy-links a::after {
    content: '›';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
}

#custom-chatbot-container .chatbot-policy-links a:hover {
    border-color: #111;
    background: #111;
    color: #fff !important;
}

#custom-chatbot-container .chatbot-policy-links a:hover::after {
    color: #fff;
}

/* Grouped footer policy links inside chatbot. */
#custom-chatbot-container .chatbot-policy-group {
    margin-top: 14px;
}

#custom-chatbot-container .chatbot-policy-heading {
    color: #111;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

#custom-chatbot-container .policy-card .chatbot-policy-group:first-of-type {
    margin-top: 12px;
}

/* Keep long policy content readable inside the chatbot. */
#custom-chatbot-container .policy-card {
    max-height: 330px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #c7c7c7 transparent;
}

#custom-chatbot-container .policy-card::-webkit-scrollbar {
    width: 5px;
}

#custom-chatbot-container .policy-card::-webkit-scrollbar-track {
    background: transparent;
}

#custom-chatbot-container .policy-card::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 999px;
}

#custom-chatbot-container .policy-card > strong {
    position: sticky;
    top: 0;
    display: block;
    background: #fff;
    padding-bottom: 8px;
    z-index: 1;
}
