/**
 * Connectivity Signals Panel Styles
 */

.connectivity-signals-panel {
    background: #1a202c;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.signals-header {
    padding: 1.5rem;
    border-bottom: 1px solid #2d3748;
    background: #2d3748;
}

.signals-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f7fafc;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signals-icon {
    font-size: 1.5rem;
}

.signals-subtitle {
    font-size: 0.875rem;
    color: #a0aec0;
    margin: 0;
}

/* Filters */
.signals-filters {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2d3748;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #1a202c;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #4a5568;
    background: #2d3748;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #4a5568;
    border-color: #718096;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

/* Status Indicator */
.signals-status {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2d3748;
    background: #1a202c;
}

/* "What we're monitoring" — always visible so the panel is informative even when
   there are no incidents. */
.signals-monitoring {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2d3748;
    background: #1a202c;
}
.signals-monitoring__title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #a0aec0;
    margin-bottom: 0.6rem;
}
.monitor-source {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    background: #2d3748;
    border-radius: 8px;
    border-left: 3px solid #4a5568;
    margin-bottom: 0.5rem;
}
.monitor-source:last-child { margin-bottom: 0; }
.monitor-source--ok   { border-left-color: #48bb78; }
.monitor-source--warn { border-left-color: #ed8936; }
.monitor-source--off  { border-left-color: #718096; opacity: 0.75; }
.monitor-source__icon { font-size: 1.1rem; line-height: 1.3; }
.monitor-source__body { flex: 1; min-width: 0; }
.monitor-source__name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f7fafc;
}
.monitor-source__desc {
    font-size: 0.72rem;
    color: #a0aec0;
    line-height: 1.45;
    margin-top: 0.15rem;
}
.monitor-source__meta {
    font-size: 0.68rem;
    color: #718096;
    margin-top: 0.3rem;
}
.monitor-pill {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.monitor-pill--ok   { background: rgba(72, 187, 120, 0.18); color: #9ae6b4; }
.monitor-pill--warn { background: rgba(237, 137, 54, 0.18);  color: #fbd38d; }
.monitor-pill--off  { background: rgba(113, 128, 150, 0.22); color: #cbd5e0; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-icon {
    font-size: 1.25rem;
}

.status-healthy {
    background: #f0fdf4;
    color: #166534;
}

.status-monitoring {
    background: #fefce8;
    color: #854d0e;
}

.status-degraded {
    background: #fff7ed;
    color: #9a3412;
}

.status-critical {
    background: #fef2f2;
    color: #991b1b;
}

.status-loading {
    background: #f7fafc;
    color: #4a5568;
}

/* Signals List */
.signals-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    background: #1a202c;
}

.signals-list::-webkit-scrollbar {
    width: 8px;
}

.signals-list::-webkit-scrollbar-track {
    background: #2d3748;
}

.signals-list::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.signals-list::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Signal Card */
.signal-card {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-left: 4px solid #cbd5e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.signal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    background: #374151;
}

.signal-card.severity-critical {
    border-left-color: #dc2626;
}

.signal-card.severity-high {
    border-left-color: #ea580c;
}

.signal-card.severity-medium {
    border-left-color: #eab308;
}

.signal-card.severity-low {
    border-left-color: #16a34a;
}

.signal-card.severity-info {
    border-left-color: #2563eb;
}

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

.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-critical .severity-badge {
    background: #fef2f2;
    color: #991b1b;
}

.severity-high .severity-badge {
    background: #fff7ed;
    color: #9a3412;
}

.severity-medium .severity-badge {
    background: #fefce8;
    color: #854d0e;
}

.severity-low .severity-badge {
    background: #f0fdf4;
    color: #166534;
}

.severity-info .severity-badge {
    background: #eff6ff;
    color: #1e40af;
}

.signal-time {
    font-size: 0.75rem;
    color: #718096;
}

.signal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f7fafc;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.signal-summary {
    font-size: 0.875rem;
    color: #cbd5e0;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.signal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #4a5568;
}

.meta-item {
    font-size: 0.75rem;
}

.meta-label {
    color: #a0aec0;
    margin-right: 0.25rem;
}

.meta-value {
    color: #e2e8f0;
    font-weight: 500;
}

.signal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #4a5568;
}

.confidence-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.confidence-badge.high {
    background: #f0fdf4;
    color: #166534;
}

.confidence-badge.medium {
    background: #fefce8;
    color: #854d0e;
}

.confidence-badge.low {
    background: #f7fafc;
    color: #4a5568;
}

.btn-details {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-details:hover {
    color: #5a67d8;
}

/* Empty State */
.signals-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

/* Loading State */
.signals-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid #f7fafc;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.signals-error {
    text-align: center;
    padding: 3rem 1rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.error-message {
    font-size: 0.875rem;
    color: #718096;
    margin: 0 0 1rem 0;
}

.btn-retry {
    padding: 0.5rem 1.5rem;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-retry:hover {
    background: #5a67d8;
}

/* Modal */
.signal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f7fafc;
}

.modal-body {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
}

.detail-section p {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.875rem;
    color: #1a202c;
    font-weight: 500;
}

.next-steps-list {
    margin: 0;
    padding-left: 1.5rem;
}

.next-steps-list li {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.btn-external {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-external:hover {
    background: #5a67d8;
}

/* Toast Notification */
.signal-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    max-width: 400px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #cbd5e0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.signal-toast.severity-critical {
    border-left-color: #dc2626;
}

.signal-toast.severity-high {
    border-left-color: #ea580c;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.toast-close:hover {
    background: #f7fafc;
}

/* Responsive */
@media (max-width: 768px) {
    .signals-filters {
        padding: 0.75rem 1rem;
    }

    .filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .signal-card {
        padding: 0.875rem;
    }

    .signal-title {
        font-size: 0.9375rem;
    }

    .signal-summary {
        font-size: 0.8125rem;
    }

    .signal-toast {
        max-width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

/* Made with Bob */
