.chatbot-container {
    font-family: 'emoji-mart', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    width: 30%;
    max-width: calc(100vw - 40px);
    height: 80%;
    max-height: 100vh;
    background: var(--wp--preset--color--base);
    border-radius: 16px;
    box-shadow: var(--wp--preset--shadow--natural);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    z-index: 9999;
    position: fixed;
    right: 0;
    bottom: 0;
    overflow: hidden;
    margin: 5px;
}
.chatbot-trigger-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: -webkit-flex;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.chatbot-trigger-container.visible {
    pointer-events: auto;
}
.chatbot-trigger-btn {
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    border: 2px solid #e6e6e6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 50px;
    height: 50px;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-trigger-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.chatbot-trigger-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.chatbot-trigger-btn svg {
    width: 24px;
    height: 24px;
}
.chatbot-trigger-btn i {
    animation: bounce 2s infinite;
    font-size: 18px;
}

.chatbot-header-content {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}
.chatbot-header-content img {
    width: 50px;
    height: 50px;
    border-radius: 50px;
}
.chatbot-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.message-avatar svg {
    width: 45px;
    height: 45px;
}
.chatbot-header-content i {
    font-size: 20px;
}
.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
    font-size: 14px;
}
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}
.chatbot-close-svg {
    cursor: pointer;
}
.chatbot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.message-avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.message-avatar i {
    font-size: 20px;
    color: #ffebf2;
}
.user-message {
    flex-direction: row-reverse;
}
.user-message .message-avatar {
    background: #e0e0e0;
}

.chatbot-message .message-content {
white-space: pre-line; 
}
.chatbot-message, .user-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.chatbot-clear-btn i {
    font-size: 18px;
}
.chatbot-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s;
}

.chatbot-typing {
    padding: 2px 20px;
    background: #f5f5f5;
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #66b5ea;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) {
     animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typing {
    0%, 60%, 100% {
         transform: translateY(0);
         opacity: 0.4;
    }
    30% {
         transform: translateY(-10px);
         opacity: 1;
    }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
         transform: translateY(0);
    }
    40% {
         transform: translateY(-10px);
    }
    60% {
         transform: translateY(-5px);
    }
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.web-assist-header {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    margin-left: 10px;
}
.toast-container {
    z-index: 9999;
}
.toast-body {
    font-weight: 500;
    font-size: 14px;
}
input[type="text"], input[type="number"] {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.25s;
}
input[type="text"]:focus, input[type="number"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    outline: none;
}
.chatbot-plugin-settings h1 {
    color: #0073aa;
    margin-bottom: 25px;
    font-size: 28px;
}
.chatbot-input, .chatbot-input-readonly {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    transition: all 0.3s;
}
.chatbot-input.chatbot-textarea {
    width: 100%;
    max-width: 460px;
    padding: 14px 14px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    transition: all 0.3s;
}
.chatbot-input:focus {
    border-color : var(--wp--preset--color--background);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    outline: none;
}
.chatbot-input-readonly {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}
#chatbot-btn-wrapper {
    display: none;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
#chatbot-btn-wrapper.visible {
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-box-pack: center;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.chatbot-btn-primary {
    background: #2563eb;
    color: #fff;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.chatbot-btn-primary:hover {
    transform: translateY(-2px);
}
.chatbot-btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}
.chatbot-btn-secondary:hover {
    background: #cbd5e1;
    color: #111827;
}
.chatbot-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
}
@media (max-width: 600px) {
    .chatbot-header-card {
        padding: 15px 18px;
    }
    .chatbot-header-card h4 {
        font-size: 20px;
    }
    .chatbot-nav-tabs {
        flex-direction: column;
    }
    .chatbot-nav-tab {
        min-width: 100%;
        border-radius: 8px;
        margin-bottom: 5px;
    }
    .chatbot-nav-tab.nav-tab-active {
        border-bottom: none;
        border-left: 4px solid #1a5cd3;
    }
    .chatbot-card {
        padding: 20px 15px;
    }
    .chatbot-container {
        width: 100%;
        height: 80%;
        bottom: 0;
        right: 0;
    }
    #chatbot-btn-wrapper.visible, .chatbot-trigger-container.visible {
        bottom: 18px !important;
        right: 18px !important;
        z-index: 99999 !important;
    }
    .chatbot-trigger-btn {
        width: 56px !important;
        height: 56px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25) !important;
    }
    .chatbot-trigger-btn img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }
    .message-content{
        padding: 4px 10px;
    }
    .chatbot-header{
        padding: 8px;
    }
    .chatbot-header-content img{
        width: 40px;
        height: 40px;
        border-radius: 50px;
    }
    .chatbot-clear-btn{
        width: 30px;
        height: 30px;
        border-radius: 50%;
    }
    .chatbot-send-btn {
        width: 30px;
        height: 30px;
        border-radius: 50%;
    }
}
@media(max-width:768px) {
    .chatbot-grid {
        grid-template-columns:1fr;
    }
}

.chatbot-header {
    background: #ffffff; 
    background: var(--wp--preset--color--base, #ffffff);
    color: #000000; 
    color: var(--wp--preset--color--contrast, #000000);
    padding: 15px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close {
    background: none;
    border: none;
    color: #000000; 
    color: var(--wp--preset--color--contrast, #000000);
    cursor: pointer;
}

.message-content {
    background: #ffffff;
    background: var(--wp--preset--color--base, #ffffff);
    padding: 10px 16px;
    border-radius: 16px;
    max-width: 70%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.chatbot-send-btn {
   background: #ffffff;
    background: var(--wp--preset--color--base, #ffffff);
    color: #000000 ;
    color: var(--wp--preset--color--contrast, #000000);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50% ;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 ;
    border: 1px solid #e0e0e0 ;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.08);
}

.chatbot-send-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}

.chatbot-send-btn svg path {
    fill: var(--wp--preset--color--contrast, #000000) ;
    stroke: var(--wp--preset--color--contrast, #000000) ;
    fill: #000000 ;
    stroke: #000000 ;
}


.chatbot-clear-btn {
   background: #ffffff;
    background: var(--wp--preset--color--base, #ffffff);
    color: #000000 ;
    color: var(--wp--preset--color--contrast, #000000);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50% ;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 ;
    border: 1px solid #e0e0e0 ;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-clear-btn:hover {
    transform: scale(1.08);
    background: #f8f9fa !important;
}

.chatbot-clear-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}

.chatbot-clear-btn svg line {
    stroke: #5f6368 ;
    stroke: var(--wp--preset--color--secondary);
}


.user-message .message-content {
    background: #f0f0f0; 
    background: var(--wp--preset--color--secondary, #f0f0f0);
    color: #000000; 
    color: var(--wp--preset--color--contrast, #000000);
}

.chatbot-input-container {
    padding: 20px 20px 0px 10px;
    background: #ffffff;
    background: var(--wp--preset--color--base, #ffffff);
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input:focus {
    outline: none;
    border-color: #2563eb;
    border-color: var(--wp--preset--color--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.chatbot-footer{
    text-align:center; 
   background: #ffffff; 
    background: var(--wp--preset--color--base, #ffffff);
    font-size:12px; 
    color: var(--wp--preset--color--secondary, #6c757d); 
    padding:5px 0; 
    border-top:1px solid rgba(255,255,255,0.1);
}