/* Shared UI primitives — loaded after shell.css */

:root {
  --green: #52c41a;
  --blue: #1890ff;
  --yellow: #f5a623;
  --ink: #262626;
  --shadow-orange: 0 8px 18px rgba(217, 115, 57, 0.22);
  --border-warm: rgba(217, 115, 57, 0.14);
  --border-warm-strong: rgba(217, 115, 57, 0.35);
  --surface-warm: #fffaf7;
}

/* —— Buttons: base + variants (only background/border/color differ) —— */

.button,
.auth-submit,
.auth-secondary,
.entry-submit,
.market-add-button,
.market-empty-add,
.detail-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, filter 180ms ease;
}

.button:hover,
.auth-submit:hover,
.auth-secondary:hover {
  transform: translateY(-1px);
}

/* Primary (orange) */
.button.orange,
.auth-submit:not(.outline):not(.danger):not(.danger-outline) {
  border-color: var(--orange);
  background: linear-gradient(180deg, #df7e42 0%, var(--orange) 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow-orange);
}

.button.orange:hover,
.auth-submit:not(.outline):not(.danger):not(.danger-outline):hover {
  box-shadow: 0 12px 24px rgba(217, 115, 57, 0.28);
}

/* Outline (neutral) */
.button.outline,
.auth-secondary,
.auth-submit.outline {
  border-color: #d9d9d9;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: none;
  font-weight: 500;
}

.button.outline:hover,
.auth-secondary:hover,
.auth-submit.outline:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

/* Danger (filled) */
.button.danger {
  border-color: #cf1322;
  background: #cf1322;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(207, 19, 34, 0.18);
}

.button.danger:hover {
  background: #a8071a;
  border-color: #a8071a;
  box-shadow: 0 10px 22px rgba(207, 19, 34, 0.24);
}

/* Danger outline */
.button.danger-outline {
  border-color: #ffccc7;
  background: #ffffff;
  color: #cf1322;
  box-shadow: none;
  font-weight: 500;
}

.button.danger-outline:hover {
  border-color: #cf1322;
  background: #fff1f0;
  box-shadow: 0 8px 18px rgba(207, 19, 34, 0.08);
}

.button.orange:disabled,
.button:disabled,
.auth-submit:disabled,
.entry-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button.disabled,
.button[aria-disabled="true"],
.market-add-button.disabled,
.market-add-button[aria-disabled="true"],
.market-empty-add.disabled,
.market-empty-add[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.market-add-button.disabled:hover,
.market-add-button[aria-disabled="true"]:hover,
.market-empty-add.disabled:hover,
.market-empty-add[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

.eyebrow,
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 4px 10px;
  border: 1px solid var(--yellow);
  border-radius: 4px;
  background: #fffbe6;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.auth-eyebrow {
  height: auto;
  color: #f59a23;
  font-size: 11px;
}

.lead,
.auth-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.auth-lead {
  font-size: 14px;
  line-height: 22px;
}

.form-field {
  display: grid;
  gap: 5px;
}

.form-field label {
  color: var(--muted);
  font-size: 12px;
}

.form-field input {
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-family: inherit;
  outline: none;
}

input[type="checkbox"].accent-orange,
.cart-item-check,
.license-modal-check input[type="checkbox"],
.legal-consent input {
  accent-color: var(--orange);
}

.license-audience-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.license-audience-tab {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border-warm-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.license-audience-tab.active {
  border-color: var(--orange);
  background: linear-gradient(180deg, #df7e42 0%, var(--orange) 100%);
  color: #fff;
}

.license-tier-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.license-tier-badge.tier-silver {
  background: #f0f2f5;
  color: #5c6670;
}

.license-tier-badge.tier-gold {
  background: #fff7e6;
  color: #ad6800;
}

.license-tier-badge.tier-diamond {
  background: #d6ecff;
  color: #1677ff;
}

.license-rules {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  background: var(--surface-warm);
}

.license-rules h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.license-rules h3:not(:first-child) {
  margin-top: 18px;
}

.license-status-panel {
  margin-top: 18px;
}

.license-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #b7eb8f;
  border-radius: 10px;
  background: #f6ffed;
  color: #237804;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.license-status-banner:hover {
  background: #eefce3;
  border-color: #95de64;
}

.license-status-banner.is-open {
  border-radius: 10px 10px 0 0;
  border-bottom-color: #d9f7be;
}

.license-status-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.license-status-sep {
  opacity: 0.7;
}

.license-status-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.15s ease;
}

.license-status-banner.is-open .license-status-chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.license-status-details {
  overflow: hidden;
  border: 1px solid #b7eb8f;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
}

.license-status-table-wrap {
  margin-top: 0;
}

.license-status-table th,
.license-status-table td {
  font-size: 12px;
  padding: 8px 12px;
}

.license-status-free-row {
  background: #fafafa;
}

.license-status-muted {
  color: var(--soft);
}

.license-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.license-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.license-table th,
.license-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.license-table th {
  color: var(--muted);
  font-weight: 600;
}

.license-tag.pending {
  background: #fff7e6;
  color: #ad6800;
}

.cart-panel {
  align-items: start;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.cart-item-check {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.cart-item-title {
  font-weight: 600;
}

.cart-item-price {
  color: var(--orange);
  font-weight: 700;
  white-space: nowrap;
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-item-qty button {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.cart-item-qty button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.cart-item-qty input {
  width: 44px;
  min-height: 28px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font: inherit;
}

.cart-item-qty input:focus {
  outline: 2px solid var(--orange-soft);
  border-color: var(--orange);
}

.cart-item-remove {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}

.cart-panel .button.outline {
  border-color: var(--border-warm-strong);
  color: var(--orange);
}

.cart-panel .button.outline:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.cart-invoice-button {
  width: 100%;
  margin-top: 14px;
}

.license-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 38, 38, 0.45);
}

.license-modal[hidden] {
  display: none;
}

.license-modal-card {
  width: min(460px, 100%);
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.license-modal-check {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.license-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.quota-breakdown {
  width: 100%;
  color: var(--soft);
  font-size: 12px;
  line-height: 18px;
}

.quota-upgrade-link {
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quota-licenses-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--border-warm-strong);
  border-radius: 6px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: #fff7f0;
}
