/**
 * YOOAdmin - Dynamic design tokens (fallbacks + UI primitives)
 *
 * @package YOOAdmin
 */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Primary brand */
  --yooadmin-primary: #eda934;
  --yooadmin-primary-600: #d89c33; /* darker hover */

  /* Secondary / neutrals */
  --yooadmin-secondary: #4B4B4B;   /* header / sidebar base */
  --yooadmin-text: #646970;        /* unified text color */
  --yooadmin-text-600: #606060;    /* default dark text */
  --yooadmin-surface: #ffffff;     /* cards / panels */
  --yooadmin-border: #e0e0e0;      /* subtle borders */

  /* Legacy aliases (keep older CSS working) */
  --yp-primary: var(--yooadmin-primary);
  --yp-secondary: var(--yooadmin-secondary);
}

/* --------------------------------------------------------------------------
   Button – neutral, brand-colored CTA
   Usage: <button class="yoopixel-button">...</button>
   -------------------------------------------------------------------------- */
.yoopixel-button {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--yooadmin-primary, #eda934);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  font: 500 14px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .02s ease;
}

.yoopixel-button:hover {
  background-color: var(--yooadmin-primary-600, #d89c33);
  color: #fff;
}

.yoopixel-button:active {
  transform: translateY(1px);
}

.yoopixel-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255,255,255,.9),
    0 0 0 4px color-mix(in srgb, var(--yooadmin-primary, #eda934) 45%, transparent);
}

.yoopixel-button[disabled],
.yoopixel-button:disabled,
.yoopixel-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .6;
  box-shadow: none;
  transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .yoopixel-button {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Optional text-link helper that follows brand color on hover
   (kept tiny; safe to remove if unused)
   -------------------------------------------------------------------------- */
.yoopixel-text-link {
  color: var(--yooadmin-text-600, #606060);
  text-decoration: none;
}
.yoopixel-text-link:hover {
  color: var(--yooadmin-primary, #eda934);
  text-decoration: underline;
}
