#guidebot-widget {
    position: fixed;
    bottom: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#guidebot-widget.guidebot-right {
    right: 24px;
}

#guidebot-widget.guidebot-left {
    left: 24px;
}

.guidebot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.guidebot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.4);
}

.guidebot-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.guidebot-chat-window {
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.guidebot-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.guidebot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.guidebot-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.guidebot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.guidebot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.guidebot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.guidebot-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.guidebot-message {
    display: flex;
}

.guidebot-message.user {
    justify-content: flex-end;
}

.guidebot-message.assistant {
    justify-content: flex-start;
}

.guidebot-message-content {
    max-width: 80%;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.guidebot-message.user .guidebot-message-content {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

.guidebot-message.assistant .guidebot-message-content {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    text-align: left;
}

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

.guidebot-typing span {
    width: 8px;
    height: 8px;
    background: #6b7280;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.guidebot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.guidebot-typing 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;
    }
}

.guidebot-input-area {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.guidebot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.guidebot-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.guidebot-send {
    width: 44px;
    height: 44px;
    background: #2563eb;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.guidebot-send:hover {
    background: #1e40af;
    transform: scale(1.05);
}

.guidebot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.guidebot-footer {
    padding: 8px 16px;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    background: white;
}

.guidebot-shortcode-container {
    width: 100%;
    max-width: 100%;
}

.guidebot-shortcode-container.guidebot-inline {
    display: block;
}

.guidebot-shortcode-container #guidebot-shortcode-root {
    width: 100%;
    height: 100%;
}

@media (max-width: 480px) {
    .guidebot-chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }

    #guidebot-widget {
        bottom: 16px;
    }

    #guidebot-widget.guidebot-right {
        right: 16px;
    }

    #guidebot-widget.guidebot-left {
        left: 16px;
    }
}

.guidebot-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}
