/* WP ChatBot Styles */
#wp-chatbot-root {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
}

.wp-chatbot-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    gap: 12px;
}

.wp-chatbot-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
}

.wp-chatbot-trigger-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow: 0 8px 40px 0 rgba(9, 105, 255, 0.18);
    filter: blur(4px);
    transform: translate(-50%, -50%) scale(1);
    z-index: 1;
    pointer-events: none;
    transition: filter 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}

.wp-chatbot-trigger:hover .wp-chatbot-trigger-bg {
    filter: blur(8px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 48px 0 rgba(9, 105, 255, 0.28);
    transform: translate(-50%, -50%) scale(1.08);
}

.wp-chatbot-icon-wrap img {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
}

.wp-chatbot-trigger:hover {
    background: none;
    box-shadow: none;
    transform: scale(1.08);
}

.wp-chatbot-label {
    display: inline-block;
    background: #0969ff;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    padding: 3px 12px;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(9, 105, 255, 0.13);
    letter-spacing: 0.02em;
    vertical-align: middle;
    transition: background 0.18s;
}

.wp-chatbot-trigger:focus .wp-chatbot-label,
.wp-chatbot-trigger:hover .wp-chatbot-label {
    background: #0056d6;
}

.wp-chatbot-container {
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: none;
    left: 24px;
    right: auto;
    animation: chatbot-fadein 0.3s cubic-bezier(.4, 2, .6, 1);
}

@keyframes chatbot-fadein {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wp-chatbot-header {
    background: linear-gradient(135deg, #0969ff 60%, #4f8cff 100%);
    color: #fff;
    padding: 18px 24px 16px 24px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 2px 8px rgba(9, 105, 255, 0.08);
    position: relative;
}

.wp-chatbot-header .status {
    font-size: 13px;
    font-weight: 400;
    margin-left: 12px;
    opacity: 0.85;
}

.wp-chatbot-header button {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    margin-left: 6px;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.wp-chatbot-header button:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.12);
}

.wp-chatbot-messages {
    flex: 1 1 0%;
    min-height: 0;
    max-height: none;
    padding: 22px 18px 12px 18px;
    overflow-y: auto;
    background: #f7fafd;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: #b0b8c9 #f7fafd;
}

.wp-chatbot-messages::-webkit-scrollbar {
    width: 7px;
}

.wp-chatbot-messages::-webkit-scrollbar-thumb {
    background: #b0b8c9;
    border-radius: 6px;
}

.wp-chatbot-messages::-webkit-scrollbar-track {
    background: #f7fafd;
}

.wp-chatbot-message {
    max-width: 82%;
    padding: 13px 18px;
    border-radius: 18px;
    font-size: 15px;
    margin-bottom: 0;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(9, 105, 255, 0.06);
}

.wp-chatbot-message.user {
    background: linear-gradient(135deg, #0969ff 60%, #4f8cff 100%);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 12px rgba(9, 105, 255, 0.13);
}

.wp-chatbot-message.bot {
    background: #fff;
    color: #23272f;
    border: 1px solid #e3e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wp-chatbot-message .message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
    display: block;
}

.wp-chatbot-input {
    padding: 14px 18px 18px 18px;
    background: #fff;
    border-top: 1px solid #f0f3f7;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.wp-chatbot-input textarea {
    flex: 1;
    border: none;
    outline: none;
    background: #f3f6fa;
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 13px;
    resize: none;
    min-height: 28px;
    max-height: 60px;
    box-shadow: 0 1px 2px rgba(9, 105, 255, 0.04);
    transition: box-shadow 0.18s;
}

.wp-chatbot-input textarea:focus {
    box-shadow: 0 0 0 2px #b3d1ff;
    background: #f7fafd;
}

.wp-chatbot-send {
    background: linear-gradient(135deg, #0969ff 60%, #4f8cff 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(9, 105, 255, 0.13);
    margin-left: 6px;
}

.wp-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-footer {
    text-align: center;
    margin-top: 6px;
    font-size: 11px;
    color: #b0b8c9;
    letter-spacing: 0.02em;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    align-items: center;
}

.typing-indicator span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b0b8c9;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

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

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .wp-chatbot-container {
        width: 98vw;
        height: 80vh;
        left: 2vw;
        bottom: 2vh;
        border-radius: 14px;
    }

    #wp-chatbot-root {
        left: 2vw;
        bottom: 2vh;
    }

    .wp-chatbot-header {
        font-size: 16px;
        padding: 14px 12px 12px 12px;
    }

    .wp-chatbot-messages {
        max-height: none;
    }

    .wp-chatbot-input {
        padding: 10px 8px 12px 8px;
    }

    .wp-chatbot-send {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .wp-chatbot-header button {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .wp-chatbot-input textarea {
        min-height: 22px;
        max-height: 40px;
        font-size: 12px;
    }
}