:root {
    --greenbot-primary: #4CAF50;
    --greenbot-secondary: #388E3C;
    --greenbot-text: #546E7A;
    --greenbot-primary-dark: #45a049;
    --greenbot-primary-light: #66bb6a;
    --greenbot-bg: #ffffff;
    --greenbot-bg-secondary: #f5f5f5;
    --greenbot-border: #e0e0e0;
    --greenbot-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --greenbot-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --greenbot-radius: 16px;
    --greenbot-radius-medium: 12px;
    --greenbot-radius-small: 8px;
    --greenbot-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --greenbot-transition: all 0.3s ease;
}

.greenbot-chat-widget {
    position: fixed;
    z-index: 999999;
    font-family: var(--greenbot-font);
    font-size: 14px;
    line-height: 1.5;
    display: block !important;
}

.greenbot-chat-widget.greenbot-bottom-right {
    bottom: 90px;
    right: 85px;
}

.greenbot-chat-widget.greenbot-bottom-left {
    bottom: 90px;
    left: 85px;
}

.greenbot-chat-widget.greenbot-top-right {
    top: 90px;
    right: 85px;
}

.greenbot-chat-widget.greenbot-top-left {
    top: 90px;
    left: 85px;
}

.greenbot-avatar-container {
    position: fixed;
    width: 66px;
    height: 66px;
    z-index: 1000001 !important;
    pointer-events: none;
}

.greenbot-avatar-container.greenbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

.greenbot-avatar-container.greenbot-bottom-left {
    bottom: 20px;
    left: 20px;
}

.greenbot-avatar-container.greenbot-top-right {
    top: 20px;
    right: 20px;
}

.greenbot-avatar-container.greenbot-top-left {
    top: 20px;
    left: 20px;
}

/* Efecto de pulso externo (halo) */
.greenbot-avatar-pulse-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: greenbot-pulse-outer 2s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes greenbot-pulse-outer {
    0% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.greenbot-avatar {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--greenbot-shadow);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: var(--greenbot-transition);
    z-index: 2 !important;
    border: 3px solid var(--greenbot-primary);
    user-select: none;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: all !important;
    top: 3px;
    left: 3px;
    background-color: white;
}

.greenbot-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--greenbot-shadow-lg);
}

.greenbot-avatar:active {
    transform: scale(0.95);
}

.greenbot-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.greenbot-avatar-default {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 24px;
}

.greenbot-avatar:not(:has(.greenbot-avatar-img)) .greenbot-avatar-default {
    display: flex !important;
}

.greenbot-avatar * {
    pointer-events: none !important;
}

.greenbot-chat-window {
    display: none !important;
    position: fixed !important;
    width: 380px !important;
    height: 600px !important;
    max-height: calc(100vh - 100px) !important;
    background: var(--greenbot-bg);
    border-radius: var(--greenbot-radius);
    box-shadow: var(--greenbot-shadow-lg);
    flex-direction: column !important;
    overflow: hidden;
    z-index: 1000000 !important;
}

.greenbot-chat-window[style*="display: block"],
.greenbot-chat-window[style*="display: flex"] {
    display: flex !important;
}

.greenbot-chat-widget.greenbot-bottom-right .greenbot-chat-window {
    bottom: 90px !important;
    right: 20px !important;
}

.greenbot-chat-widget.greenbot-bottom-left .greenbot-chat-window {
    bottom: 90px !important;
    left: 20px !important;
}

.greenbot-chat-widget.greenbot-top-right .greenbot-chat-window {
    top: 90px !important;
    right: 20px !important;
}

.greenbot-chat-widget.greenbot-top-left .greenbot-chat-window {
    top: 90px !important;
    left: 20px !important;
}

.greenbot-chat-header {
    background-color: var(--greenbot-primary);
    color: white;
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0;
    border-radius: var(--greenbot-radius) var(--greenbot-radius) 0 0;
    min-height: 70px !important;
    box-sizing: border-box !important;
}

.greenbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.greenbot-header-content.no-avatar {
    padding-left: 0 !important;
}

.greenbot-header-content.no-avatar .greenbot-header-info {
    margin-left: 0 !important;
}

.greenbot-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.greenbot-avatar-small-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.greenbot-avatar-small {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.greenbot-header-avatar:not(:has(.greenbot-avatar-small-img)) .greenbot-avatar-small {
    display: flex !important;
}

.greenbot-header-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.greenbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: block;
}

.greenbot-header-actions {
    display: flex !important;
    gap: 6px !important;
    align-items: center;
}

.greenbot-btn-minimize,
.greenbot-btn-close {
    background: var(--greenbot-primary);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
}

.greenbot-btn-minimize:hover,
.greenbot-btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.greenbot-btn-minimize:active,
.greenbot-btn-close:active {
    background: rgba(255, 255, 255, 0.3);
}

.greenbot-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--greenbot-bg-secondary);
}

.greenbot-messages-container {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--greenbot-border) transparent;
}

.greenbot-messages-container::-webkit-scrollbar {
    width: 6px;
}

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

.greenbot-messages-container::-webkit-scrollbar-thumb {
    background: var(--greenbot-border);
    border-radius: 3px;
}

.greenbot-messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--greenbot-text);
}

.greenbot-message {
    display: flex;
    margin-bottom: 16px;
    gap: 10px;
    animation: greenbot-message-appear 0.3s ease;
}

@keyframes greenbot-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greenbot-bot-message {
    align-items: flex-start;
}

.greenbot-user-message {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.greenbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.greenbot-avatar-tiny-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.greenbot-avatar-tiny {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.greenbot-message-avatar:not(:has(.greenbot-avatar-tiny-img)) .greenbot-avatar-tiny {
    display: flex !important;
}

.greenbot-user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--greenbot-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.greenbot-message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.greenbot-user-message .greenbot-message-content {
    align-items: flex-end;
}

.greenbot-message-text {
    padding: 12px 14px;
    border-radius: var(--greenbot-radius-medium);
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.greenbot-bot-message .greenbot-message-text {
    background: white;
    border: 1px solid var(--greenbot-border);
    color: var(--greenbot-text);
    border-radius: var(--greenbot-radius-medium) var(--greenbot-radius-medium) var(--greenbot-radius-medium) 4px;
}

.greenbot-user-message .greenbot-message-text {
    background: var(--greenbot-primary);
    color: white;
    border-radius: var(--greenbot-radius-medium) var(--greenbot-radius-medium) 4px var(--greenbot-radius-medium);
}

.greenbot-message-time {
    font-size: 11px;
    color: var(--greenbot-text);
    opacity: 0.7;
    padding: 0 4px;
}

.greenbot-user-message .greenbot-message-time {
    text-align: right;
}

.greenbot-redirect-link {
    margin-top: 6px;
}

.greenbot-redirect-link a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--greenbot-primary);
    text-decoration: none;
    padding: 6px 12px;
    border: 1.5px solid var(--greenbot-primary);
    border-radius: var(--greenbot-radius-small);
    transition: all 0.2s ease;
    font-weight: 500;
}

.greenbot-redirect-link a:hover {
    background: var(--greenbot-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.greenbot-quick-questions {
    margin: 16px 0;
    padding: 12px;
    background: white;
    border-radius: var(--greenbot-radius-medium);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.greenbot-quick-questions-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--greenbot-text);
    margin: 0 0 10px 0;
    opacity: 0.8;
}

.greenbot-quick-question {
    display: block;
    width: 100%;
    background: white;
    border: 1.5px solid var(--greenbot-primary);
    border-radius: var(--greenbot-radius-small);
    padding: 10px 14px;
    margin: 6px 0;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    color: var(--greenbot-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.greenbot-quick-question:hover {
    background: var(--greenbot-primary);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.greenbot-quick-question:active {
    transform: translateX(2px);
}

.greenbot-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    animation: greenbot-typing-appear 0.3s ease;
}

@keyframes greenbot-typing-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greenbot-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--greenbot-border);
    border-radius: var(--greenbot-radius-medium);
}

.greenbot-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--greenbot-text);
    animation: greenbot-typing-bounce 1.4s ease-in-out infinite both;
}

.greenbot-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.greenbot-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes greenbot-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.greenbot-chat-footer {
    padding: 16px;
    border-top: 1px solid var(--greenbot-border);
    flex-shrink: 0;
    background: white;
}

.greenbot-chat-form {
    margin: 0;
}

.greenbot-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

#greenbot-message-input {
    flex: 1;
    border: 2px solid var(--greenbot-border);
    border-radius: 12px;
    padding: 0px 20px 0px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 100px;
    line-height: 1.5;
    transition: border-color 0.2s ease;
    outline: none;
}

#greenbot-message-input:focus {
    border-color: var(--greenbot-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.greenbot-send-btn {
    background: var(--greenbot-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.greenbot-send-btn:hover:not(:disabled) {
    background: var(--greenbot-primary-dark);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.greenbot-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.greenbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.greenbot-powered-by {
    text-align: center;
    padding: 8px 0 4px;
}

.greenbot-powered-by small {
    font-size: 10px;
    color: #fff;
    opacity: 1;
}

.greenbot-product-suggestion .greenbot-product-card {
    background: white;
    border: 1px solid var(--greenbot-border);
    border-radius: var(--greenbot-radius-medium);
    overflow: hidden;
    margin-top: 8px;
}

.greenbot-product-image {
    width: 100%;
    height: 140px;
    background: var(--greenbot-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.greenbot-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.greenbot-product-info {
    padding: 12px;
}

.greenbot-product-name {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--greenbot-text);
}

.greenbot-product-description {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: var(--greenbot-text);
    opacity: 0.8;
    line-height: 1.4;
}

.greenbot-product-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--greenbot-primary);
    margin-bottom: 10px;
}

.greenbot-product-link {
    display: inline-block;
    background: var(--greenbot-primary);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--greenbot-radius-small);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.greenbot-product-link:hover {
    background: var(--greenbot-primary-dark);
}

.greenbot-system-message {
    justify-content: center;
    margin: 12px 0;
}

.greenbot-system-message .greenbot-message-content {
    max-width: 90%;
    text-align: center;
}

.greenbot-system-message .greenbot-message-text {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    padding: 8px 12px;
}

.greenbot-pagination-info {
    margin: 15px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

body.greenbot-dragging {
    cursor: grabbing !important;
    user-select: none;
}

body.greenbot-dragging .greenbot-avatar {
    cursor: grabbing !important;
    transition: none;
}

@media (max-width: 768px) {
    .greenbot-chat-window {
        width: calc(100vw - 40px) !important;
        height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
    }
    
    .greenbot-chat-widget.greenbot-bottom-right .greenbot-chat-window,
    .greenbot-chat-widget.greenbot-bottom-left .greenbot-chat-window {
        bottom: 90px !important;
        left: 20px !important;
        right: 20px !important;
    }
    
    .greenbot-chat-widget.greenbot-top-right .greenbot-chat-window,
    .greenbot-chat-widget.greenbot-top-left .greenbot-chat-window {
        top: 90px !important;
        left: 20px !important;
        right: 20px !important;
    }
    
    .greenbot-message-content {
        max-width: 80%;
    }
    
    .greenbot-avatar-container {
        width: 56px;
        height: 56px;
    }
    
    .greenbot-avatar {
        width: 50px;
        height: 50px;
        top: 3px;
        left: 3px;
    }
}

@media (max-width: 480px) {
    .greenbot-chat-window {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
    }
    
    .greenbot-chat-widget.greenbot-bottom-right .greenbot-chat-window,
    .greenbot-chat-widget.greenbot-bottom-left .greenbot-chat-window,
    .greenbot-chat-widget.greenbot-top-right .greenbot-chat-window,
    .greenbot-chat-widget.greenbot-top-left .greenbot-chat-window {
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
    }

    .greenbot-avatar-container.greenbot-bottom-right {
        width: 56px;
        height: 56px;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .greenbot-avatar {
        width: 50px;
        height: 50px;
        top: 3px;
        left: 3px;
    }
    
    .greenbot-chat-header {
        border-radius: 0 !important;
    }

    .greenbot-message-content {
        max-width: 85%;
    }
    
    .greenbot-quick-question {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .greenbot-avatar,
    .greenbot-message,
    .greenbot-typing-indicator,
    .greenbot-quick-question,
    .greenbot-send-btn,
    .greenbot-redirect-link a {
        transition: none;
        animation: none;
    }

    .greenbot-avatar-pulse-outer {
        animation: none;
        display: none;
    }

    .greenbot-typing-dots span {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .greenbot-chat-window {
        border: 2px solid var(--greenbot-primary);
    }

    .greenbot-message-text {
        border-width: 2px;
    }

    .greenbot-bot-message .greenbot-message-text {
        border-color: var(--greenbot-text);
    }

    .greenbot-user-message .greenbot-message-text {
        border-color: var(--greenbot-primary);
    }
    
    .greenbot-quick-question {
        border-width: 2px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --greenbot-bg: #1e1e1e;
        --greenbot-bg-secondary: #2a2a2a;
        --greenbot-border: #3a3a3a;
        --greenbot-text: #e0e0e0;
    }
    
    .greenbot-bot-message .greenbot-message-text {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }
    
    .greenbot-typing-dots {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .greenbot-quick-questions {
        background: #2a2a2a;
    }
    
    .greenbot-quick-question {
        background: #2a2a2a;
    }
    
    .greenbot-chat-footer {
        background: #1e1e1e;
    }
}

@media print {
    .greenbot-chat-widget {
        display: none !important;
    }
}

.greenbot-btn-minimize:focus,
.greenbot-btn-close:focus,
.greenbot-send-btn:focus,
.greenbot-quick-question:focus,
#greenbot-message-input:focus {
    outline: 2px solid var(--greenbot-primary);
    outline-offset: 2px;
}

.greenbot-avatar:focus {
    outline: 3px solid var(--greenbot-primary);
    outline-offset: 3px;
}

.greenbot-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: greenbot-spin 0.8s linear infinite;
}

@keyframes greenbot-spin {
    to {
        transform: rotate(360deg);
    }
}

.greenbot-hidden {
    display: none !important;
}

.greenbot-invisible {
    visibility: hidden !important;
}

.greenbot-fade-in {
    animation: greenbot-fade-in 0.3s ease;
}

@keyframes greenbot-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.greenbot-slide-up {
    animation: greenbot-slide-up 0.3s ease;
}

@keyframes greenbot-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greenbot-admin-message {
    display: flex;
    margin-bottom: 15px;
    animation: slideInUp 0.3s ease;
}

.greenbot-admin-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
    flex-shrink: 0;
}

.greenbot-message-sender {
    font-weight: 600;
    font-size: 12px;
    color: #4CAF50;
    margin-bottom: 4px;
}

.greenbot-admin-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 300px;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideInRight 0.3s ease;
}

.greenbot-admin-notification .notification-content {
    flex: 1;
}

.greenbot-admin-notification .notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.greenbot-admin-message .greenbot-message-content .greenbot-message-text {
    color: white !important;
    padding: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1.5;
}

.greenbot-admin-message .greenbot-message-sender {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.greenbot-admin-message .greenbot-message-time {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 10px;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.greenbot-quick-question {
    color: var(--greenbot-primary) !important;
    background: white !important;
}

.greenbot-quick-question:hover {
    color: white !important;
    background: var(--greenbot-primary) !important;
}

.greenbot-admin-message .greenbot-message-text {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
    color: white !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.greenbot-admin-message .greenbot-message-sender {
    color: #4CAF50 !important;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.greenbot-admin-message .greenbot-message-time {
    color: rgba(84, 110, 122, 0.7) !important;
    font-size: 10px;
}

@media (max-width: 480px) {
    .greenbot-quick-question {
        color: var(--greenbot-primary) !important;
        background: white !important;
        border: 2px solid var(--greenbot-primary) !important;
        font-weight: 500;
    }
    
    .greenbot-quick-question:active {
        color: white !important;
        background: var(--greenbot-primary) !important;
    }
    
	.greenbot-admin-message .greenbot-message-content .greenbot-message-text {
		background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
		color: white !important;
		padding: 12px 14px;
		border-radius: 12px;
		font-size: 14px;
		line-height: 1.5;
		box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
	}

	.greenbot-admin-message .greenbot-message-sender {
		color: #4CAF50 !important;
		font-size: 12px;
		font-weight: 600;
		margin-bottom: 4px;
	}

	.greenbot-admin-message .greenbot-message-time {
		color: rgba(84, 110, 122, 0.7) !important;
		font-size: 10px;
	}	
}

@media (max-width: 768px) {
    .greenbot-quick-question {
        font-size: 13px;
        padding: 10px 14px;
        color: var(--greenbot-primary) !important;
    }
    
    .greenbot-admin-message .greenbot-message-text {
        font-size: 13px;
        padding: 12px 14px !important;
    }
}

@media (max-width: 768px) {
    
    .greenbot-quick-questions .greenbot-quick-question {
        color: #333333 !important;
        background: white !important;
        border: 1.5px solid var(--greenbot-primary) !important;
    }
    
    .greenbot-quick-questions .greenbot-quick-question:hover {
        color: white !important;
        background: var(--greenbot-primary) !important;
    }
    
    .greenbot-quick-questions-title {
        color: #333333 !important;
    }
    
    .greenbot-admin-message .message-content {
        color: #333333 !important;
    }
    
    .greenbot-admin-message .message-sender {
        color: #4CAF50 !important;
    }
    
    .greenbot-admin-message .message-time {
        color: #666666 !important;
    }
    
    .greenbot-bot-message .greenbot-message-text {
        color: #333333 !important;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    .greenbot-user-message .greenbot-message-text {
        color: white !important;
        background: var(--greenbot-primary) !important;
    }
    
    #greenbot-message-input {
        color: #333333 !important;
        background: white !important;
        border: 2px solid var(--greenbot-primary) !important;
    }
    
    #greenbot-message-input::placeholder {
        color: #666666 !important;
    }
    
    .greenbot-admin-notification {
        background: #4CAF50 !important;
        color: white !important;
        max-width: 90vw !important;
        left: 5vw !important;
        right: 5vw !important;
    }
    
    .greenbot-admin-notification .notification-content {
        color: white !important;
    }
    
    .greenbot-admin-notification .notification-content strong {
        color: white !important;
    }
}

@media (max-width: 480px) {
    
    .greenbot-chat-window {
        border-radius: 0 !important;
    }
    
    .greenbot-chat-header {
        border-radius: 0 !important;
    }
    
    .greenbot-message-content {
        max-width: 85% !important;
    }
    
    .greenbot-message-text {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .greenbot-quick-question {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
    
    .greenbot-message-time {
        color: #666666 !important;
    }
    
    .greenbot-powered-by small {
        color: #666666 !important;
    }
}

.dashicons-update-spin {
    animation: greenbot-spin 1s infinite linear;
}

.dashicons-yes {
    animation: none !important;
}

@keyframes greenbot-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.conversation-status.connected {
    color: #46b450 !important;
}

.conversation-status.updating {
    color: #4CAF50 !important;
}

.conversation-status.error {
    color: #dc3232 !important;
}

@media (prefers-contrast: high) {
    .greenbot-quick-question {
        border-width: 2px !important;
    }
    
    .greenbot-message-text {
        border-width: 2px !important;
    }
    
    #greenbot-message-input {
        border-width: 2px !important;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .greenbot-quick-questions .greenbot-quick-question {
        color: #e0e0e0 !important;
        background: #2a2a2a !important;
        border-color: #4CAF50 !important;
    }
    
    .greenbot-bot-message .greenbot-message-text {
        color: #e0e0e0 !important;
        background: #2a2a2a !important;
        border-color: #3a3a3a !important;
    }
    
    .greenbot-admin-message .message-content {
        color: #e0e0e0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .greenbot-avatar-pulse-outer {
        animation: none !important;
        display: none !important;
    }
    
    .dashicons-update-spin {
        animation: none !important;
    }
    
    .greenbot-message {
        animation: none !important;
    }
    
    .greenbot-quick-question {
        transition: none !important;
    }
}

@media (max-width: 768px) {
    .greenbot-avatar-container {
        width: 70px !important;
        height: 70px !important;
    }
    
    .greenbot-avatar-container.greenbot-bottom-right {
        bottom: 25px !important;
        right: 25px !important;
    }
    
    .greenbot-avatar-container.greenbot-bottom-left {
        bottom: 25px !important;
        left: 25px !important;
    }
    
    .greenbot-avatar-container.greenbot-top-right {
        top: 25px !important;
        right: 25px !important;
    }
    
    .greenbot-avatar-container.greenbot-top-left {
        top: 25px !important;
        left: 25px !important;
    }
    
    .greenbot-avatar {
        width: 64px !important;
        height: 64px !important;
        top: 3px !important;
        left: 3px !important;
    }
    
    .greenbot-chat-window {
        border-radius: 20px 20px 0 0 !important;
    }
    
    .greenbot-quick-question {
        min-height: 50px;
        display: flex;
        align-items: center;
        padding: 15px;
        font-size: 16px;
    }
    
    #greenbot-message-input {
        font-size: 16px;
        min-height: 50px;
    }
    
    .greenbot-send-btn {
        width: 50px;
        height: 50px;
    }
}

.greenbot-avatar {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.greenbot-quick-question,
.greenbot-send-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.greenbot-floating-message {
    position: absolute;
    bottom: 70px;
    right: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 250px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    z-index: 100001;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    border: 2px solid white;
    animation: greenbotFloatIn 0.3s ease-out;
}

.greenbot-floating-message:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #4CAF50;
}

@keyframes greenbotFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes greenbotPulse {
    0% { 
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.6);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        transform: scale(1);
    }
}

@keyframes greenbotAvatarPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(76, 175, 80, 0.7);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    }
}

.greenbot-avatar-pulsing {
    animation: greenbotAvatarPulse 1.5s infinite;
}

.greenbot-avatar-img {
    transition: all 0.3s ease;
}

.greenbot-avatar-img:hover {
    transform: scale(1.05);
}

.greenbot-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePulse 1.5s infinite;
    z-index: 3;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.greenbot-notification-pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.greenbot-admin-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    max-width: 300px;
    z-index: 10000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.greenbot-admin-notification:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #4CAF50;
    font-size: 14px;
}

.notification-icon {
    font-size: 18px;
}

.notification-message {
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.notification-close:hover {
    color: #333;
}