/* Estilos personalizados para Chatwoot Workflows */

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

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

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* Workflow Preview Styles */
.workflow-block {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.workflow-block:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.25);
    transform: translateY(-2px);
}

.workflow-block.start {
    border-color: #198754;
    background-color: #f8fff9;
}

.workflow-block.end {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.block-title {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.block-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.block-type.start {
    background-color: #d1e7dd;
    color: #0f5132;
}

.block-type.end {
    background-color: #f8d7da;
    color: #721c24;
}

.block-type.default {
    background-color: #cff4fc;
    color: #055160;
}

.block-message {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
}

.block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.block-button {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    cursor: help;
}

.block-button:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.block-actions {
    margin: 8px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.block-action-info {
    font-size: 12px;
    color: #495057;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Active Workflows List */
.workflow-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workflow-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.25);
}

.workflow-info {
    flex: 1;
}

.workflow-name {
    font-weight: 600;
    color: #495057;
    margin: 0;
    font-size: 0.9rem;
}

.workflow-details {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 0;
}

.workflow-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Alert Styles */
.alert {
    border-radius: 0.375rem;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

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

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* JSON Editor */
#workflowConfig {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Custom checkbox */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Badge styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Dropdown menu */
.dropdown-menu {
    z-index: 1060;
}

/* Progress bar customizada */
.progress-bar {
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

/* Ícones de arquivo */
.fa-file-video {
    color: #dc3545;
}

.fa-file-image {
    color: #198754;
}

.fa-file-audio {
    color: #fd7e14;
}

.fa-file {
    color: #6c757d;
}

/* Font monospace para IDs */
.font-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Área de preview de código */
pre code {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.875rem;
    color: #495057;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

.status-active {
    background-color: #198754;
}

.status-inactive {
    background-color: #6c757d;
}

/* Melhorias para acessibilidade */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .workflow-block {
        padding: 0.75rem;
    }
    
    .block-buttons {
        flex-direction: column;
    }
    
    .block-button {
        text-align: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Auto Follow-up Styles */
.auto-followup-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.auto-followup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.auto-followup-title {
    color: white;
    margin: 0;
    font-weight: 600;
}

.auto-followup-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.auto-followup-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
    backdrop-filter: blur(10px);
}

.auto-followup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auto-followup-item:last-child {
    border-bottom: none;
}

.auto-followup-block-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.auto-followup-delay {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 500;
}

.auto-followup-details {
    text-align: right;
}

.auto-followup-details small {
    color: rgba(255, 255, 255, 0.8);
}

.block-auto-followup {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.375rem;
    color: white;
}

.auto-followup-indicator {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.auto-followup-text {
    color: white;
}

.auto-followup-indicator small {
    color: rgba(255, 255, 255, 0.8);
}

/* Hover effects para auto follow-up */
.auto-followup-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.block-auto-followup:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Estilos para Next Block */
.block-next-block {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 0.375rem;
    color: white;
}

.next-block-indicator {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.next-block-text {
    color: white;
}

.block-next-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

/* Responsive design para auto follow-up */
@media (max-width: 768px) {
    .auto-followup-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .auto-followup-details {
        text-align: left;
    }
    
    .auto-followup-indicator {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

/* Botões com Auto Follow-up */
.block-button.has-auto-followup {
    position: relative;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
}

.block-button.has-auto-followup:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(102, 126, 234, 0.3);
}

.auto-followup-icon {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Estilos para Pause Bot */
.pause-bot-section {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.pause-bot-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.pause-bot-header i {
    font-size: 20px;
}

.pause-bot-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: auto;
}

.pause-bot-content {
    padding: 20px;
    color: white;
}

.pause-bot-description {
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.pause-bot-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pause-bot-block-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pause-bot-block-name {
    font-weight: 600;
}

.pause-bot-team {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    opacity: 0.8;
}

/* Indicador de Pause Bot nos blocos */
.workflow-block.pause-bot {
    border-left: 4px solid #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(238, 90, 36, 0.05));
}

.pause-bot-indicator {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.pause-bot-indicator i {
    font-size: 12px;
}

/* Hover effects para pause bot */
.pause-bot-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.workflow-block.pause-bot:hover {
    border-left-width: 6px;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

/* Responsive design para pause bot */
@media (max-width: 768px) {
    .pause-bot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pause-bot-team {
        align-self: flex-end;
    }
    
    .pause-bot-indicator {
        font-size: 10px;
        padding: 3px 6px;
    }
} 