/*
 * File: assets/css/plugins.css, the plugin markup of the public and portal pages in the Mammoth look.
 * Purpose: sets the --plex- properties the core portal sheets read and the --pshop- properties of plex-shop to the
 * theme tokens, and styles the core form and system card classes of the customer log in and reset pages and the
 * add-on markup of the plex-shop partials.
 * Defines: the --plex- values on :root, the --pshop- values on body.site, the .plex- form and card rules and the .pshop- add-on rules
 * Doc: docs/notes/mammothcomics.com/assets/themes/mammoth/assets/css/plugins.css.md
 */

/* Linked after core css/admin/tokens.css on a portal page, this rule wins by source order; the theme tokens follow
   data-theme, and 1 mapping covers both modes. */
:root {
  --plex-accent: var(--accent);
  --plex-accent-hover: var(--accent-hover);
  --plex-on-accent: var(--on-accent);
  --plex-focus: var(--focus);
  --plex-surface: var(--panel);
  --plex-surface-2: var(--bg-alt);
  --plex-text: var(--text);
  --plex-text-muted: var(--text-2);
  --plex-border: var(--line);
  --plex-border-strong: var(--line-strong);
  --plex-btn-light: var(--btn-light);
  --plex-btn-light-hover: var(--btn-light-hover);
  --plex-on-btn-light: var(--on-btn-light);
  --plex-success: var(--status-success);
  --plex-warning: var(--status-warning);
  --plex-danger: var(--status-danger);
  --plex-danger-hover: var(--status-danger-hover);
  --plex-toast: var(--toast);
  --plex-badge-dark: var(--badge-dark);
  --plex-shade: var(--shade);
  --plex-scrim: var(--scrim);
  --plex-font-system: var(--font-body);
  --plex-font: var(--font-body);
  --plex-r-md: var(--r-sm);
  --plex-r-lg: var(--r-md);
}

/* shop.css prints its :root set inside the page body, after this file; the body rule is inherited past it. */
body.site {
  --pshop-surface: var(--panel);
  --pshop-surface-2: var(--bg-alt);
  --pshop-text: var(--text);
  --pshop-muted: var(--text-2);
  --pshop-border: var(--line);
  --pshop-border-strong: var(--line-strong);
  --pshop-accent: var(--accent);
  --pshop-accent-hover: var(--accent-hover);
  --pshop-on-accent: var(--on-accent);
  --pshop-btn-light: var(--btn-light);
  --pshop-btn-light-hover: var(--btn-light-hover);
  --pshop-on-btn-light: var(--on-btn-light);
  --pshop-danger: var(--status-danger);
  --pshop-radius: var(--r-sm);
  --pshop-radius-sm: var(--r-sm);
}

/* The core buttons inside the theme pages take the theme button: the hard shadow and the 48px height. */
.site .plex-btn {
  min-height: var(--control-height);
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-sm);
  box-shadow: var(--button-shadow-default);
  font-family: var(--font-body);
  font-size: var(--fs-3);
  font-weight: 700;
  text-decoration: none;
}

.site .plex-btn-sm { min-height: var(--target-min); padding: 0 var(--s-3); font-size: var(--fs-2); }
.site .plex-btn:active { box-shadow: var(--button-shadow-pressed); transform: translate(2px, 2px); }
.site .plex-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The customer log in and reset cards of core system/portal-login and system/portal-reset. */
.portal-body .plex-system-card {
  display: grid;
  gap: var(--s-4);
  max-width: 520px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.portal-body .plex-system-title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.portal-body .plex-system-text { color: var(--text-2); }

.portal-body .plex-system-status {
  padding: var(--s-3) var(--s-4);
  background: var(--status-success);
  color: var(--on-status);
  border-radius: var(--r-sm);
  font-weight: 500;
}

.portal-body .plex-system-links { margin: 0; }

.site .plex-form { display: grid; gap: var(--s-4); margin: 0; }
.site .plex-field { display: grid; gap: var(--s-1); margin: 0; }

.site .plex-label {
  color: var(--text);
  font-size: var(--fs-2);
  font-weight: 500;
}

.site :is(.plex-input, .plex-select) {
  width: 100%;
  min-height: var(--control-height);
  padding: var(--s-3);
  background: var(--panel);
  color: var(--text);
  border: var(--border-field) solid var(--field-border-default);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-3);
}

.site :is(.plex-input, .plex-select):hover { border-color: var(--field-border-hover); }
.site :is(.plex-input, .plex-select):focus { border-color: var(--field-border-focus); }
.site :is(.plex-input, .plex-select):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.site .plex-hint { color: var(--text-3); font-size: var(--fs-2); }

.site .plex-field-error {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  margin: 0;
  padding: var(--s-2) var(--s-3);
  background: var(--status-danger);
  color: var(--on-status);
  border-radius: var(--r-sm);
  font-size: var(--fs-2);
  font-weight: 500;
}

.site .plex-form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0; }

@media (max-width: 767px) {
  .site .plex-form-actions .plex-btn,
  .portal-body .plex-system-links .plex-btn { width: 100%; justify-content: center; }
}

/* plex-shop notices and tables of the account screens it prints in its own markup. */
.site .plex-notice { border-radius: var(--r-md); }
.site .plex-table th { color: var(--text-2); }

/* The add-on groups of the plex-shop partial shop/product-addons in the buy box, in the look of the option choices:
   shop.css links inside the body after this file, and the .site prefix outranks its single class rules. */
.site .pshop-addons {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.site .pshop-addons .pshop-label {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--text);
  font-size: var(--fs-2);
  font-weight: 500;
  line-height: var(--lh-meta);
}

.site .pshop-addons .pshop-values { display: grid; gap: var(--s-2); }

.site .pshop-addon-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-3);
  min-height: var(--target-min);
  cursor: pointer;
}

.site .pshop-addon-choice input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--field-accent-default);
}

.site .pshop-addon-price {
  color: var(--text-2);
  font-size: var(--fs-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* The add-ons of 1 line from the plex-shop partial shop/line-addons, under the line label of the cart, the checkout
   summary and the 2 order pages, in the type of the variant label. */
.site .pshop-line-addons {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: var(--fs-2);
  line-height: var(--lh-meta);
}
