/* CBT Chatbot Framework Custom Styles */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
}

.alert-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}

/* Workflow Builder Styles */
.workflow-builder {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.state-palette {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.state-palette h6 {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.state-item {
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.state-item:active {
    cursor: grabbing;
}

.state-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Network Canvas Styles */
.vis-network {
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
                linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
                linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Properties Panel Styles */
.properties-panel {
    background: #ffffff;
    border-left: 3px solid #007bff;
}

.properties-panel h6 {
    color: #007bff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

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

/* Chat Interface Styles */
.chat-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 70%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in;
}

.message.user {
    background: #007bff;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: white;
    color: #333;
    margin-right: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message.system {
    background: #ffc107;
    color: #333;
    margin: 0 auto;
    text-align: center;
    font-style: italic;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-in;
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-builder {
        height: auto;
    }

    .builder-content {
        flex-direction: column;
    }

    .state-palette,
    .properties-panel {
        width: 100%;
        max-height: 200px;
    }

    .workflow-canvas {
        min-height: 400px;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

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

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

/* Drag and Drop States */
.drag-over {
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
}

.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active { background-color: #28a745; }
.status-inactive { background-color: #dc3545; }
.status-draft { background-color: #ffc107; }
.status-archived { background-color: #6c757d; }

/* Tooltips */
.tooltip-inner {
    background-color: #333;
    color: white;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Progress Bars */
.progress {
    border-radius: 10px;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}