.env-config-widget {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 500px;
  color-scheme: light dark;

  /* CSS Variables for theming */
  --env-bg: #ffffff;
  --env-bg-row: #f8f9fa;
  --env-bg-input: #ffffff;
  --env-border: #e1e5e9;
  --env-text: #172b4d;
  --env-text-muted: #6b778c;
  --env-accent: #0052cc;
  --env-success: #22c55e;
  --env-success-bg: rgba(34, 197, 94, 0.1);
  --env-error: #ef4444;
  --env-error-bg: rgba(239, 68, 68, 0.1);
  --env-shadow: rgba(0, 0, 0, 0.08);

  .env-config-container {
    border: 1px solid var(--env-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--env-shadow);
  }

  .env-config-row {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--env-bg);
    border-bottom: 1px solid var(--env-border);
  }

  .env-config-row:last-of-type {
    border-bottom: none;
  }

  .env-config-row[data-status="valid"] {
    background: var(--env-success-bg);
  }

  .env-config-row[data-status="invalid"] {
    background: var(--env-error-bg);
  }

  .env-var-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--env-text);
  }

  .env-var-field {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .env-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid var(--env-border);
    border-radius: 4px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--env-bg-input);
    color: var(--env-text);
  }

  .env-input:focus {
    outline: none;
    border-color: var(--env-accent);
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
  }

  .env-input::placeholder {
    color: var(--env-text-muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  }

  .env-var-status {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 24px;
    justify-content: flex-end;
  }

  .env-check {
    color: var(--env-success);
  }

  .env-error-icon {
    color: var(--env-error);
  }

  .env-error-text {
    display: flex;
    align-items: center;
  }

  .env-config-footer {
    padding: 8px 14px;
    font-size: 12px;
    text-align: center;
    border-top: 1px solid var(--env-border);
    background: var(--env-bg-row);
    color: var(--env-text-muted);
  }
}

/* Dark mode styles */
.dark .env-config-widget,
.dark-theme .env-config-widget,
[data-theme="dark"] .env-config-widget {
  --env-bg: #1e1e1e;
  --env-bg-row: #2a2a2a;
  --env-bg-input: #2a2a2a;
  --env-border: #3a3a3a;
  --env-text: #e0e0e0;
  --env-text-muted: #a0a0a0;
  --env-accent: #4d9fff;
  --env-success: #4ade80;
  --env-success-bg: rgba(74, 222, 128, 0.15);
  --env-error: #f87171;
  --env-error-bg: rgba(248, 113, 113, 0.15);
  --env-shadow: rgba(0, 0, 0, 0.3);
}
