/* Steppy AI Chatbot Styles */

/* Widget Button */
.steppy-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.steppy-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.steppy-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.steppy-widget-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.steppy-widget-button.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Credit Badge */
.steppy-credit-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

.steppy-credit-badge.low {
    background: #f59e0b;
}

.steppy-credit-badge.zero {
    background: #ef4444;
}

/* Chat Window */
.steppy-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    animation: slideUp 0.3s ease;
}

.steppy-chat-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.steppy-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.steppy-header-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.steppy-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.steppy-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.steppy-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Credits Display */
.steppy-credits-display {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Messages Container */
.steppy-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.steppy-messages::-webkit-scrollbar {
    width: 6px;
}

.steppy-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.steppy-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

/* Pre-message */
.steppy-pre-message {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.steppy-pre-message p {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

/* Quick Actions */
.steppy-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.steppy-quick-action {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
    color: #374151;
}

.steppy-quick-action:hover {
    border-color: #667eea;
    background: #f3f4f6;
    transform: translateX(5px);
}

/* Message Bubbles */
.steppy-message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.steppy-message.user {
    text-align: right;
}

.steppy-message-content {
    display: inline-block;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.steppy-message.bot .steppy-message-content {
    background: white;
    color: #374151;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.steppy-message.user .steppy-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.steppy-typing {
    display: none;
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.steppy-typing.active {
    display: inline-block;
}

.steppy-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.steppy-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.steppy-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;
    }
}

/* Paywall Message */
.steppy-paywall {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 10px 0;
    border: 2px solid #f59e0b;
}

.steppy-paywall-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.steppy-paywall h4 {
    margin: 0 0 10px 0;
    color: #92400e;
    font-size: 16px;
}

.steppy-paywall p {
    margin: 0 0 15px 0;
    color: #78350f;
    font-size: 13px;
}

.steppy-paywall-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.steppy-paywall-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s;
}

.steppy-paywall-btn:hover {
    transform: translateY(-2px);
}

.steppy-subscribe-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.steppy-refer-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

/* Input Area */
.steppy-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.steppy-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.steppy-input:focus {
    border-color: #667eea;
}

.steppy-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.steppy-send-btn:hover {
    transform: scale(1.1);
}

.steppy-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.steppy-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .steppy-chat-window {
        width: calc(100% - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
        left: 20px;
        border-radius: 20px 20px 0 0;
    }
    
    .steppy-widget-button {
        width: 55px;
        height: 55px;
    }
}

/* Error State */
.steppy-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 13px;
    border-left: 4px solid #ef4444;
}