/* =========================================================
   NEXT Design System — unified UI tokens & visual normalization
   ========================================================= */
:root {
  --next-primary: #00BABA;
  --next-primary-dark: #008F91;
  --next-primary-soft: #E8FAFA;

  --next-ink: #172326;
  --next-text: #465457;
  --next-muted: #6F7D80;
  --next-placeholder: #9AA5A7;
  --next-muted-on-dark: #B8C3C5;

  --next-surface: #FFFFFF;
  --next-surface-soft: #F7FAFB;
  --next-border: #E9EFF0;

  --next-success: #008F91;
  --next-success-soft: #E8F7F7;
  --next-danger: #E53935;
  --next-danger-dark: #C62828;
  --next-danger-soft: #FCE8E8;
  --next-warning: #C98A1F;
  --next-warning-dark: #8A5E1C;
  --next-warning-soft: #FFF8EC;

  --next-radius-sm: 6px;
  --next-radius-md: 10px;
  --next-radius: 16px;
  --next-radius-lg: 20px;
  --next-shadow: 0 10px 30px rgba(23,35,38,.06);
  --next-shadow-hover: 0 16px 36px rgba(23,35,38,.12);
  --next-focus: 0 0 0 3px rgba(0,186,186,.16);

  /* Backward-compatible aliases for existing theme CSS */
  --primary: var(--next-primary);
  --secondary: var(--next-primary-soft);
  --color-text: var(--next-text);
}

html { color-scheme: light; }
body {
  color: var(--next-ink);
  background: var(--next-surface);
  font-family: 'iranyekan', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0;
  box-shadow: var(--next-focus);
}

/* Consistent form controls */
input, select, textarea, button { font-family: 'iranyekan', sans-serif; }
input.input-text, input[type=text], input[type=email], input[type=number], input[type=url], input[type=tel], input[type=password], select, textarea {
  color: var(--next-ink);
  background: var(--next-surface);
  border-color: var(--next-border);
}

/* Buttons / CTAs */
.button, button.button, input.button, .woocommerce-button, .wp-element-button {
  border-radius: var(--next-radius-md);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.button:hover, button.button:hover, input.button:hover, .woocommerce-button:hover, .wp-element-button:hover {
  transform: translateY(-1px);
}

/* Common status surfaces */
.next-success, .status-completed, .status-delivered {
  background: var(--next-success-soft);
  color: var(--next-success);
}
.next-danger, .status-cancelled, .status-failed, .status-refunded {
  background: var(--next-danger-soft);
  color: var(--next-danger-dark);
}
.next-warning, .status-processing, .status-pending, .status-on-hold {
  background: var(--next-warning-soft);
  color: var(--next-warning-dark);
}

/* Reduce visual noise from nested boxes while keeping separation */
.next-card, .content-card, .user-card, .payment-method-card {
  border-color: var(--next-border);
}

/* Account: fully aligned with the main storefront */
.woocommerce-account .acc-wrap { color: var(--next-ink); }
.woocommerce-account .user-card-header,
.woocommerce-account .loyalty-card { background: var(--next-ink); }
.woocommerce-account .avatar-ring { background: var(--next-primary); }
.woocommerce-account .content-card,
.woocommerce-account .user-card,
.woocommerce-account .payment-method-card,
.woocommerce-account .acc-content .woocommerce-Address { background: var(--next-surface); }
.woocommerce-account .stat-box,
.woocommerce-account .order-thumb,
.woocommerce-account .pm-icon,
.woocommerce-account .pm-empty { background: var(--next-surface-soft); }
.woocommerce-account .progress-bar-fill { background: var(--next-primary); }
.woocommerce-account .loyalty-card .lc-meta span:last-child { color: var(--next-primary); }
.woocommerce-account .payment-method-card.is-default { border-color: var(--next-primary); background: var(--next-primary-soft); }

/* Responsive rhythm */
@media (max-width: 768px) {
  .content-card-body { padding: 18px; }
  .content-card-header { padding: 16px 18px; }
}
