/* Ecommerce Admin — auradecantism dark theme decorators */

@layer decorators {

/* ── ea-sidebar: App shell sidebar ── */
.ea-sidebar {
  background: var(--d-surface);
  border-right: 1px solid var(--d-border);
}

.ea-sidebar [data-active="true"] {
  background: color-mix(in srgb, var(--d-accent) 12%, transparent);
  color: var(--d-accent);
}

.ea-sidebar [data-active="true"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--d-accent);
  border-radius: 0 2px 2px 0;
}

/* ── ea-card: Elevated card with hover lift ── */
.ea-card {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  box-shadow: var(--d-shadow);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.ea-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--d-shadow-md);
  border-color: color-mix(in srgb, var(--d-accent) 40%, var(--d-border));
}

/* ── ea-kpi-accent: KPI with accent top border ── */
.ea-kpi-accent {
  position: relative;
  overflow: hidden;
}

.ea-kpi-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--d-accent), color-mix(in srgb, var(--d-accent) 60%, var(--d-primary)));
  border-radius: var(--d-radius) var(--d-radius) 0 0;
}

/* ── ea-button-accent: Solid accent button ── */
.ea-button-accent {
  background: var(--d-accent);
  color: #fff;
  border: none;
  border-radius: var(--d-radius);
  padding: var(--d-interactive-py) var(--d-interactive-px);
  font-weight: 500;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
}

.ea-button-accent:hover {
  background: color-mix(in srgb, var(--d-accent) 85%, #fff);
  box-shadow: 0 0 24px color-mix(in srgb, var(--d-accent) 30%, transparent);
}

.ea-button-accent:focus-visible {
  outline: 2px solid var(--d-accent);
  outline-offset: 2px;
}

/* ── ea-fade-in ── */
.ea-fade-in {
  animation: ea-fade-in 0.4s ease-out both;
}

@keyframes ea-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── ea-gradient-text ── */
.ea-gradient-text {
  background: linear-gradient(135deg, var(--d-accent), var(--d-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── ea-avatar ── */
.ea-avatar {
  border-radius: var(--d-radius-full);
  background: linear-gradient(135deg, var(--d-accent), var(--d-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

/* ── ea-status-badge: Order/product status ── */
.ea-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--d-radius-full);
  background: var(--d-surface-raised);
  color: var(--d-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ea-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.ea-status-badge[data-status="paid"],
.ea-status-badge[data-status="delivered"],
.ea-status-badge[data-status="active"],
.ea-status-badge[data-status="fulfilled"],
.ea-status-badge[data-status="in-stock"] {
  background: color-mix(in srgb, var(--d-success) 15%, transparent);
  color: var(--d-success);
}

.ea-status-badge[data-status="pending"],
.ea-status-badge[data-status="processing"],
.ea-status-badge[data-status="low-stock"] {
  background: color-mix(in srgb, var(--d-warning) 15%, transparent);
  color: var(--d-warning);
}

.ea-status-badge[data-status="shipped"],
.ea-status-badge[data-status="draft"] {
  background: color-mix(in srgb, var(--d-info) 15%, transparent);
  color: var(--d-info);
}

.ea-status-badge[data-status="cancelled"],
.ea-status-badge[data-status="refunded"],
.ea-status-badge[data-status="out-of-stock"],
.ea-status-badge[data-status="failed"] {
  background: color-mix(in srgb, var(--d-error) 15%, transparent);
  color: var(--d-error);
}

/* ── ea-kanban-column ── */
.ea-kanban-column {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  padding: 0.75rem;
  min-width: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ea-kanban-card {
  background: var(--d-surface-raised);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius-sm);
  padding: 0.625rem 0.75rem;
  cursor: grab;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.ea-kanban-card:hover {
  border-color: color-mix(in srgb, var(--d-accent) 50%, var(--d-border));
  box-shadow: var(--d-shadow-md);
  transform: translateY(-1px);
}

.ea-kanban-card:active {
  cursor: grabbing;
}

/* ── ea-sparkline ── */
.ea-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
}

.ea-sparkline-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--d-accent), color-mix(in srgb, var(--d-accent) 40%, transparent));
  border-radius: 1px;
  min-width: 3px;
  transition: opacity 150ms ease;
}

.ea-sparkline:hover .ea-sparkline-bar {
  opacity: 0.7;
}

/* ── ea-chart-bar ── */
.ea-chart-bar {
  background: linear-gradient(180deg, var(--d-accent), color-mix(in srgb, var(--d-accent) 50%, transparent));
  border-radius: var(--d-radius-sm) var(--d-radius-sm) 0 0;
  transition: height 400ms ease-out, opacity 150ms ease;
  min-width: 8px;
}

.ea-chart-bar:hover {
  opacity: 0.8;
}

/* ── ea-gauge ── */
.ea-gauge-track {
  height: 6px;
  background: var(--d-surface-raised);
  border-radius: var(--d-radius-full);
  overflow: hidden;
}

.ea-gauge-fill {
  height: 100%;
  border-radius: var(--d-radius-full);
  transition: width 600ms ease-out;
  background: linear-gradient(90deg, var(--d-accent), color-mix(in srgb, var(--d-accent) 60%, var(--d-primary)));
}

.ea-gauge-fill[data-level="safe"] { background: var(--d-success); }
.ea-gauge-fill[data-level="warn"] { background: var(--d-warning); }
.ea-gauge-fill[data-level="critical"] { background: var(--d-error); }

/* ── ea-product-thumb ── */
.ea-product-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--d-radius-sm);
  background: linear-gradient(135deg, color-mix(in srgb, var(--d-accent) 40%, var(--d-surface-raised)), color-mix(in srgb, var(--d-primary) 40%, var(--d-surface-raised)));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

/* ── ea-table-row-selected ── */
.ea-table-row-selected {
  background: color-mix(in srgb, var(--d-accent) 8%, transparent) !important;
}

/* ── ea-inline-input ── */
.ea-inline-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--d-radius-sm);
  padding: 0.125rem 0.375rem;
  font: inherit;
  color: inherit;
  width: 100%;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.ea-inline-input:hover {
  border-color: var(--d-border);
}

.ea-inline-input:focus {
  border-color: var(--d-accent);
  background: var(--d-surface-raised);
}

} /* end @layer decorators */
