/**
 * Rise to n8n Connector - Plugin Styles
 * Version: 1.0.0
 */

/* ============================================
   Dashboard Widgets
   ============================================ */

.risetonen-dashboard-widget {
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.risetonen-dashboard-widget:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.risetonen-widget-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.risetonen-widget-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.risetonen-widget-pending .risetonen-widget-value {
    color: #ffc107;
}

.risetonen-widget-success .risetonen-widget-value {
    color: #28a745;
}

.risetonen-widget-failed .risetonen-widget-value {
    color: #dc3545;
}

.risetonen-widget-dead .risetonen-widget-value {
    color: #6c757d;
}

.risetonen-widget-footer {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* ============================================
   Quick Actions
   ============================================ */

.risetonen-quick-actions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.risetonen-quick-actions .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* ============================================
   Webhook List Styling
   ============================================ */

.risetonen-webhook-url {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #495057;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risetonen-event-count {
    display: inline-block;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
}

.risetonen-webhook-active {
    color: #28a745;
}

.risetonen-webhook-inactive {
    color: #dc3545;
}

/* ============================================
   Event Selector
   ============================================ */

.risetonen-event-selector {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.risetonen-event-category {
    margin-bottom: 20px;
}

.risetonen-category-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
}

.risetonen-event-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.risetonen-event-checkbox {
    display: flex;
    align-items: center;
}

.risetonen-event-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.risetonen-event-checkbox label {
    margin-bottom: 0;
    font-size: 13px;
    cursor: pointer;
}

.risetonen-select-all-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.risetonen-select-all-controls .btn {
    margin-right: 10px;
}

/* ============================================
   Custom Headers Section
   ============================================ */

.risetonen-custom-headers-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.risetonen-header-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.risetonen-header-key {
    flex: 1;
}

.risetonen-header-value {
    flex: 2;
}

.risetonen-header-remove {
    flex-shrink: 0;
}

.risetonen-add-header-btn {
    margin-top: 10px;
}

/* ============================================
   Secret Key Display
   ============================================ */

.risetonen-secret-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.risetonen-secret-input {
    flex: 1;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    background: #f8f9fa;
}

.risetonen-copy-btn,
.risetonen-rotate-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   Queue Status Cards
   ============================================ */

.risetonen-queue-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.risetonen-queue-stat-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.risetonen-queue-stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.risetonen-queue-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 500;
}

.risetonen-queue-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.risetonen-queue-stat-card.pending .risetonen-queue-stat-value {
    color: #ffc107;
}

.risetonen-queue-stat-card.processing .risetonen-queue-stat-value {
    color: #17a2b8;
}

.risetonen-queue-stat-card.success .risetonen-queue-stat-value {
    color: #28a745;
}

.risetonen-queue-stat-card.failed .risetonen-queue-stat-value {
    color: #dc3545;
}

.risetonen-queue-stat-card.dead_letter .risetonen-queue-stat-value {
    color: #6c757d;
}

/* ============================================
   Queue Health Table
   ============================================ */

.risetonen-queue-health {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.risetonen-queue-health h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.risetonen-health-table {
    width: 100%;
}

.risetonen-health-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.risetonen-health-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f1f1;
}

.risetonen-health-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.risetonen-health-status.healthy {
    background: #d4edda;
    color: #155724;
}

.risetonen-health-status.warning {
    background: #fff3cd;
    color: #856404;
}

.risetonen-health-status.critical {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   Log Details Modal
   ============================================ */

.risetonen-log-details-section {
    margin-bottom: 25px;
}

.risetonen-log-details-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.risetonen-detail-table {
    width: 100%;
    font-size: 13px;
}

.risetonen-detail-table th {
    text-align: left;
    padding: 8px;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 30%;
}

.risetonen-detail-table td {
    padding: 8px;
    border-bottom: 1px solid #f1f1f1;
}

.risetonen-code-block {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
    max-height: 300px;
    border: 1px solid #dee2e6;
}

.risetonen-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 13px;
}

/* ============================================
   Status Badges
   ============================================ */

.risetonen-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.risetonen-status-badge.success {
    background: #d4edda;
    color: #155724;
}

.risetonen-status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

.risetonen-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.risetonen-status-badge.processing {
    background: #d1ecf1;
    color: #0c5460;
}

/* ============================================
   Settings Page
   ============================================ */

.risetonen-settings-section {
    margin-bottom: 30px;
}

.risetonen-settings-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

/* ============================================
   Settings Page Specific
   ============================================ */

.risetonen-settings-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
}

.risetonen-settings-card .card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .risetonen-event-checkbox-group {
        grid-template-columns: 1fr;
    }

    .risetonen-queue-stats {
        grid-template-columns: 1fr;
    }

    .risetonen-header-row {
        flex-direction: column;
    }
}
