/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(250, 128, 57, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(250, 128, 57, 0.4);
}

.chatbot-toggle svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active svg {
    transform: rotate(45deg);
}

.chatbot-pulse {
    animation: chatbotPulse 1.5s ease-in-out infinite;
}

@keyframes chatbotPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(250, 128, 57, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(250, 128, 57, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(250, 128, 57, 0.3);
    }
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.chatbot-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.chatbot-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
    color: #fff;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-close-btn:active {
    transform: scale(0.95);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    color: white;
}

.chatbot-message.user .chatbot-message-avatar {
    background: #e9ecef;
    color: #495057;
}

.chatbot-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    color: white;
}

.chatbot-message-text {
    margin: 0;
    line-height: 1.4;
    font-size: 14px;
}

.chatbot-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-option {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: fit-content;
}

.chatbot-option:hover {
    background: #e9ecef;
    border-color: #FA8039;
}

.chatbot-option.selected {
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    color: white;
    border-color: transparent;
}

.chatbot-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.chatbot-input:focus {
    border-color: #FA8039;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FA8039;
    animation: typing 1.4s infinite ease-in-out;
}

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

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-progress {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.chatbot-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #FA8039 0%, #FF6B35 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: -10px;
        bottom: 55px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .chatbot-options {
        flex-direction: column;
    }
    
    .chatbot-option {
        font-size: 14px;
        padding: 10px 16px;
        text-align: left;
    }
    
    .chatbot-close-btn {
        width: 28px;
        height: 28px;
    }
    
    .chatbot-close-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Form field specific styles */
.chatbot-form-field {
    margin-top: 15px;
}

.chatbot-form-field input,
.chatbot-form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 5px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-form-field input:focus,
.chatbot-form-field select:focus {
    border-color: #FA8039;
}

.chatbot-form-field label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Success message */
.chatbot-success {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    color: #155724;
    margin-top: 15px;
}

.chatbot-success-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Error message */
.chatbot-error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    color: #721c24;
    margin-top: 15px;
}

.chatbot-error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}
