/* STANDARD THEME FOR CLEA */

:root {
  /* Override Tailwind V4 theme variables */
  --color-seco-dark: #f3f4f6 !important; /* light gray background like official Clea */
  --color-seco-card: #ffffff !important;
  --color-seco-mint: #2563eb !important; /* Clea standard blue */
  
  /* Override internal layout CSS variables */
  --bg-primary: #f3f4f6 !important;
  --bg-card: #ffffff !important;
  --text-primary: #111827 !important;
  --text-muted: #6b7280 !important;
  --accent-primary: #2563eb !important;
  --card-border: #d1d5db !important;

  /* Accent colors */
  --accent-cyan: #0ea5e9;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #2563eb;
  --accent-magenta: #d946ef;
  --accent-blue: #2563eb;

  /* Status Colors */
  --status-healthy: #10b981;
  --status-degraded: #f59e0b;
  --status-critical: #ef4444;
  --status-offline: #64748b;

  /* Utility classes */
  --wrap-field-value-break: break-word;
}

.wrap-field-value {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}


body, html, main {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.text-seco-mint {
  color: var(--accent-primary) !important;
}
.bg-seco-mint {
  background-color: var(--accent-primary) !important;
}
.border-seco-mint {
  border-color: var(--accent-primary) !important;
}
.bg-seco-mint\/5 {
  background-color: rgba(37, 99, 235, 0.05) !important;
}
.bg-seco-mint\/10 {
  background-color: rgba(37, 99, 235, 0.1) !important;
}
.bg-seco-mint\/15 {
  background-color: rgba(37, 99, 235, 0.14) !important;
}
.bg-seco-mint\/20, .hover\:bg-seco-mint\/20:hover {
  background-color: rgba(37, 99, 235, 0.18) !important;
}
.border-seco-mint\/10 {
  border-color: rgba(37, 99, 235, 0.1) !important;
}
.border-seco-mint\/20 {
  border-color: rgba(37, 99, 235, 0.2) !important;
}
.border-seco-mint\/30 {
  border-color: rgba(37, 99, 235, 0.3) !important;
}
.border-seco-mint\/40, .hover\:border-seco-mint\/40:hover {
  border-color: rgba(37, 99, 235, 0.4) !important;
}

/* Primary Buttons in Clea Standard Blue */
.btn-primary,
button.bg-seco-mint,
a.bg-seco-mint,
span.bg-seco-mint {
  background-color: var(--accent-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}
.btn-primary:hover,
button.bg-seco-mint:hover,
a.bg-seco-mint:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

/* Neutralize any residual teal/mint utility classes to Clea Standard Blue */
[class*="text-teal-"] {
  color: var(--accent-primary) !important;
}
[class*="bg-teal-500\/"] {
  background-color: rgba(37, 99, 235, 0.08) !important;
}
[class*="border-teal-"] {
  border-color: rgba(37, 99, 235, 0.22) !important;
}

/* Override utility colors where classes were hardcoded without variables */
.clea-logo-img {
  content: url('/clea-logo-new.png') !important;
}

.text-white, .text-slate-200, .text-slate-300 {
  color: var(--text-primary) !important;
}
.text-slate-400, .text-slate-500 {
  color: var(--text-muted) !important;
}
.bg-black\/40 {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
.bg-black\/20 {
  background-color: #f9fafb !important;
}
.bg-black\/30 {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}
.bg-black\/50 {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}
.bg-black\/60 {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}
.hover\:bg-black\/60:hover {
  background-color: #f3f4f6 !important;
}

/* Modal/Drawer Overlays - must remain semi-transparent and blurred */
.fixed.bg-black\/60, .fixed.bg-black\/80 {
  background-color: rgba(15, 23, 42, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: none !important;
}
.bg-slate-950\/95, .bg-slate-900\/95 {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(30px) !important;
}
.bg-white\/\[0\.02\], .bg-white\/\[0\.03\], .bg-white\/5 {
  background-color: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
}
.group-hover\:text-white:hover {
  color: #000000 !important;
}
.bg-seco-dark {
  background-color: var(--bg-primary) !important;
}
.border-white\/5, .border-white\/10, .border-white\/20 {
  border-color: rgba(0, 0, 0, 0.1) !important;
}
input, select, textarea {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

/* ============================================
   TOPOLOGY & OBSERVABILITY (CLEA STANDARD BLUE)
   ============================================ */

:root {
  --thermidor-glow-clea: rgba(37, 99, 235, 0.15);
}

.observability-view {
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: 1;
}

.topology-container {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  background: #f3f4f6 !important;
}

/* Subtle grid pattern background */
.topology-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.metrics-bar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--card-border);
}

.topology-node {
  padding: 14px 18px;
  border-radius: 12px;
  background: white !important;
  border: 1px solid #d1d5db !important;
  cursor: pointer;
  min-width: 160px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease;
  position: relative;
}

.topology-node:hover {
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}

.topology-node--selected {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
  transform: scale(1.02);
}

.topology-node__name { font-weight: 700; color: #111827 !important; }

.topology-node__metrics {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.topology-node__metric-value {
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 700;
  font-family: var(--font-mono);
}

.node-detail {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  height: 100vh;
  background: white !important;
  border-left: 1px solid #d1d5db;
  z-index: 201;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1) !important;
  display: flex;
  flex-direction: column;
}

.node-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 200;
}

.node-detail__header {
  padding: 32px 24px 24px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.node-detail__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.node-detail__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.05);
}

.node-detail__close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-detail__name {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.node-detail__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.node-detail__status--healthy { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.node-detail__status--degraded { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.node-detail__status--critical { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.node-detail__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.node-detail__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.node-detail__section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 16px;
}

/* Metrics Grid & Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-card {
  padding: 18px;
  border-radius: 12px;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  transition: all 0.2s;
}

.metric-card:hover { border-color: #2563eb !important; background: white !important; }

.metric-card__label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric-card__value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  font-family: var(--font-mono);
}

.metric-card__bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 12px;
}

.metric-card__bar-fill {
  height: 100%;
  transition: width 1s;
}

/* Mini Charts */
.mini-chart {
  margin-top: 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 16px;
}

.mini-chart__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 12px;
}

/* Edge Node (Clea) */
.edge-node {
  padding: 12px;
  border-radius: 12px;
  background: white;
  border: 1px solid #d1d5db;
  min-width: 140px;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

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

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in-right { animation: slideInRight 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.animate-fade-in-up { animation: fadeInUp 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }

#particle-gradient stop:nth-child(2) { stop-color: #2563eb !important; stop-opacity: 1 !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
