.lcf-chatbot-container *,
.lcf-chatbot-container *::before,
.lcf-chatbot-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

/* Main container - fixed position */
.lcf-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hidden toggle checkbox */
.lcf-chatbot-toggle-input {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Toggle button */
.lcf-chatbot-toggle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #428bca;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    color: white;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    &::before {content : '' !important;}
}

.lcf-chatbot-toggle-btn:hover {
    background-color: #428bca;
    transform: scale(1.05);
}

.lcf-chatbot-toggle-btn:active {
    transform: scale(0.95);
}

.lcf-chatbot-icon {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

.lcf-chatbot-icon-close {
    display: none;
}

/* Notification dot */
.lcf-chatbot-notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: #ff4757;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: lcf-chatbot-pulse 2s infinite;
}

@keyframes lcf-chatbot-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 71, 87, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* Chat window */
.lcf-chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

/* Show chat window when checkbox is checked */
.lcf-chatbot-toggle-input:checked~.lcf-chatbot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lcf-chatbot-toggle-input:checked~.lcf-chatbot-toggle-btn .lcf-chatbot-icon-open {
    display: none;
}

.lcf-chatbot-toggle-input:checked~.lcf-chatbot-toggle-btn .lcf-chatbot-icon-close {
    display: block;
}

.lcf-chatbot-toggle-input:checked~.lcf-chatbot-toggle-btn .lcf-chatbot-notification-dot {
    display: none;
}

/* Chat header */
.lcf-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #428bca 0%, #357ebd 100%);
    color: white;
    flex-shrink: 0;
}

.lcf-chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lcf-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lcf-chatbot-avatar-icon {
    width: 22px;
    height: 22px;
    fill: white;
}

.lcf-chatbot-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lcf-chatbot-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.lcf-chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.lcf-chatbot-status-indicator {
    width: 8px;
    height: 8px;
    background-color: #4cd964;
    border-radius: 50%;
    animation: lcf-chatbot-status-pulse 2s infinite;
}

@keyframes lcf-chatbot-status-pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.lcf-chatbot-header-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.2s;
}

.lcf-chatbot-header-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.lcf-chatbot-header-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Messages container */
.lcf-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Message bubbles */
.lcf-chatbot-message {
    display: flex;
    max-width: 85%;
    animation: lcf-chatbot-message-appear 0.3s ease-out;
}

@keyframes lcf-chatbot-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lcf-chatbot-message-bot {
    align-self: flex-start;
}

.lcf-chatbot-message-user {
    align-self: flex-end;
}

.lcf-chatbot-message-content {
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lcf-chatbot-message-bot .lcf-chatbot-message-content {
    background-color: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.lcf-chatbot-message-user .lcf-chatbot-message-content {
    background-color: #428bca;
    color: white;
    border-bottom-right-radius: 4px;
}

.lcf-chatbot-message-text {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.lcf-chatbot-message-time {
    font-size: 11px;
    margin-top: 6px;
    text-align: right;
    opacity: 0.7;
}

.lcf-chatbot-message-user .lcf-chatbot-message-time {
    color: rgba(255, 255, 255, 0.8);
}

.lcf-chatbot-message-bot .lcf-chatbot-message-time {
    color: #6c757d;
}

/* Typing indicator */
.lcf-chatbot-typing-indicator {
    display: none;
    padding: 12px 20px;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.lcf-chatbot-typing-dots {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.lcf-chatbot-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #adb5bd;
    animation: lcf-chatbot-typing 1.4s infinite ease-in-out both;
}

.lcf-chatbot-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.lcf-chatbot-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes lcf-chatbot-typing {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.lcf-chatbot-typing-text {
    font-size: 12px;
    color: #6c757d;
}

/* Input area */
.lcf-chatbot-input-area {
    padding: 16px 20px;
    background-color: white;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.lcf-chatbot-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lcf-chatbot-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
    outline: none;
    background-color: #f8f9fa;
}

.lcf-chatbot-input:focus {
    border-color: #428bca;
    background-color: white;
    /* box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1); */
}

.lcf-chatbot-input-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #428bca;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lcf-chatbot-input-btn:hover {
    background-color: #428bca;
    transform: scale(1.05);
}

.lcf-chatbot-input-btn:active {
    transform: scale(0.95);
}

.lcf-chatbot-input-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.lcf-chatbot-input-hint {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    opacity: 0.7;
}

/* Custom scrollbar for messages */
.lcf-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.lcf-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.lcf-chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.lcf-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Verification screen */
.lcf-chatbot-verification-screen {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #f8f9fa;
    text-align: center;
}

.lcf-chatbot-verification-text {
    font-size: 14px;
    color: #495057;
    margin-bottom: 16px;
}
/* Verification loading state */
.lcf-chatbot-verification-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 13px;
}

.lcf-chatbot-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #dee2e6;
    border-top-color: #428bca;
    border-radius: 50%;
    animation: lcf-chatbot-spin 0.9s linear infinite;
    margin-bottom: 8px;
}

@keyframes lcf-chatbot-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .lcf-chatbot-container {
        bottom: 10px;
        right: 10px;
    }

    .lcf-chatbot-window {
        width: calc(100vw - 40px);
        right: 0;
        bottom: 65px;
        height: 450px;
    }

    .lcf-chatbot-toggle-btn {
        width: 50px;
        height: 50px;
    }
}