/**
 * ShopDesk — shared design tokens & utilities (storefront + admin).
 * Load after Google Fonts, before app CSS.
 */
:root {
  --sd-font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --sd-font-display: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --sd-font-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --sd-font-ui-display: "IBM Plex Serif", "Georgia", serif;
  --sd-text-xs: 0.6875rem;
  --sd-text-sm: 0.8125rem;
  --sd-text-base: 1rem;
  --sd-leading-tight: 1.35;
  --sd-leading-normal: 1.55;
  --sd-leading-relaxed: 1.65;
  --sd-radius-sm: 8px;
  --sd-radius-md: 12px;
  --sd-radius-lg: 16px;
  --sd-color-api-link: #0c3d6b;
  --sd-color-api-link-hover: #0a2744;
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Readable hints: hyphenate long tokens; width caps live in admin-platform / store.css */
.section-hint {
  text-align: start;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1,
h2,
h3,
.section-title {
  text-wrap: balance;
}

/* Admin: legacy form stack shorthand (used in index.html) */
.f {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Professional API link style (footer strip + inline docs) */
.sd-api-link,
.platform-api-footer a {
  color: var(--sd-color-api-link);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.sd-api-link:hover,
.platform-api-footer a:hover {
  color: var(--sd-color-api-link-hover);
  border-bottom-color: rgba(12, 61, 107, 0.35);
}

.platform-api-footer {
  margin-top: auto;
  padding: 0.65rem 1.5rem 1.25rem;
  border-top: 1px solid #d8dee8;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #f4f6f9 100%);
}
.platform-api-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-family: var(--sd-font-ui);
  font-size: var(--sd-text-sm);
  color: #4a5568;
  line-height: var(--sd-leading-tight);
}
.platform-api-footer-label {
  font-size: var(--sd-text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #718096;
  margin-right: 0.25rem;
}
.platform-api-footer-inner code {
  font-size: 0.78em;
  background: rgba(12, 61, 107, 0.08);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

/* Storefront API strip (optional) */
.store-api-footer {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding: 0.75rem 2rem 1.5rem;
  font-family: var(--sd-font-sans);
  font-size: var(--sd-text-sm);
  color: var(--mid, #4a4640);
  border-top: 1px solid var(--border, #e8e4de);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  line-height: var(--sd-leading-normal);
}
.store-api-footer a {
  color: var(--accent, #1a1a2e);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 26, 46, 0.2);
}
.store-api-footer a:hover {
  border-bottom-color: var(--accent, #1a1a2e);
}

/* ─── Form controls: sizing, alignment, mature defaults ─── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  font-family: inherit;
  line-height: 1.45;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

/* Native checkboxes/radios: fixed 14×14px everywhere (id’d toggles and data-pref store prefs). Text/number/textarea unchanged. */
input[type="checkbox"],
input[type="radio"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  margin: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  accent-color: #0c3d6b;
  cursor: pointer;
  vertical-align: top;
}

input[type="radio"] {
  border-radius: 50%;
}
