/* Chatbot Generator Styles */

body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

.section-header {
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h6 {
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.code-output {
    background: #2d3748;
    color: #e2e8f0;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 600px;
    overflow: auto;
}

.code-output pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-output code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.alert-info {
    border-left: 4px solid #007bff;
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

/* Code syntax highlighting adjustments */
.token.tag {
    color: #e06c75;
}

.token.attr-name {
    color: #d19a66;
}

.token.attr-value {
    color: #98c379;
}

.token.string {
    color: #98c379;
}

.token.comment {
    color: #7c7c7c;
}

.token.keyword {
    color: #c678dd;
}

.token.function {
    color: #61afef;
}

/* Custom chatbot preview styles */
.chatbot-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.preview-chatbot-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.preview-chatbot-toggle:hover {
    transform: scale(1.1);
}

.preview-chatbot-window {
    position: absolute;
    bottom: 90px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.preview-chatbot-window.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.preview-chatbot-header {
    padding: 16px;
    border-radius: 16px 16px 0 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
}

.preview-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

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

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

.preview-message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.preview-message.user .preview-message-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.preview-message.assistant .preview-message-content {
    background: #f1f3f5;
    color: #343a40;
    border-bottom-left-radius: 4px;
}

.preview-chatbot-input {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 16px 16px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 15px;
    }
    
    .row {
        margin: 0;
    }
    
    .col-lg-6 {
        padding: 0 15px;
        margin-bottom: 20px;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading {
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}