:root {
  --athsp-accent: var(--wp-admin-theme-color, #2271b1);
  --athsp-accent-strong: var(--wp-admin-theme-color-darker-10, #135e96);
  --athsp-accent-soft: color-mix(in srgb, var(--athsp-accent) 10%, white);
  --athsp-surface: #ffffff;
  --athsp-surface-soft: #f7fafc;
  --athsp-border: rgba(15, 23, 42, 0.08);
  --athsp-border-strong: rgba(15, 23, 42, 0.14);
  --athsp-text: #102027;
  --athsp-muted: #5b6b73;
  --athsp-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  --athsp-radius-lg: 22px;
  --athsp-radius-md: 16px;
  --athsp-radius-sm: 12px;
}

.athsp-editor {
  display: grid;
  gap: 16px;
  margin-top: 10px;
  color: var(--athsp-text);
}

.athsp-status,
.athsp-panel,
.athsp-summary-card {
  border: 1px solid var(--athsp-border);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--athsp-accent) 12%, transparent) 0, transparent 32%),
    linear-gradient(180deg, #ffffff, var(--athsp-surface-soft));
  box-shadow: var(--athsp-shadow);
}

.athsp-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
}

.athsp-status__kicker,
.athsp-selection-card__eyebrow,
.ath-sp-offer-catalog__selection-kicker,
.athsp-summary-card__label,
.athsp-lookup__title,
.ath-sp-offer-catalog__field-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.athsp-status__kicker,
.athsp-summary-card__label,
.athsp-selection-card__eyebrow,
.ath-sp-offer-catalog__selection-kicker,
.ath-sp-offer-catalog__field-label {
  color: var(--athsp-muted);
}

.athsp-status__title {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

.athsp-status__sub,
.athsp-panel__copy,
.athsp-help,
.athsp-lookup__description,
.athsp-toggle__text small,
.athsp-muted,
.ath-sp-offer-catalog__toggle-text small,
.ath-sp-empty,
.ath-sp-offer-catalog__empty,
.ath-sp-offer-catalog__msg {
  color: var(--athsp-muted);
}

.athsp-status__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 74px;
  padding: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--athsp-accent), var(--athsp-accent-strong));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.athsp-checks,
.athsp-inline-meta,
.athsp-actions,
.ath-sp-offer-catalog__selection-meta,
.ath-sp-picker__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.athsp-check,
.athsp-id-chip,
.athsp-badge,
.ath-sp-chip,
.ath-sp-offer-catalog__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 5px;
  border: 1px solid var(--athsp-border-strong);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.athsp-check[data-state="ok"] {
  border-color: color-mix(in srgb, var(--athsp-accent) 35%, transparent);
  background: color-mix(in srgb, var(--athsp-accent) 12%, white);
  color: var(--athsp-accent-strong);
}

.athsp-check[data-state="warn"] {
  border-color: rgba(180, 83, 9, 0.24);
  background: rgba(180, 83, 9, 0.08);
  color: #8a4b08;
}

.athsp-editor__summary,
.athsp-editor__grid,
.athsp-panel__grid,
.ath-sp-offer-catalog__fields {
  display: grid;
  gap: 14px;
}

.athsp-editor__summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.athsp-summary-card {
  padding: 16px 18px;
  border-radius: 18px;
}

.athsp-summary-card__value {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
}

.athsp-editor__grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.athsp-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--athsp-radius-lg);
}

.athsp-panel--wide {
  min-width: 0;
}

.athsp-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.athsp-panel__head--spread {
  align-items: center;
}

.athsp-panel__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.athsp-panel__copy {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.athsp-panel__grid--links {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.athsp-panel__stack {
  display: grid;
  gap: 16px;
}

.athsp-field,
.ath-sp-offer-catalog__field {
  display: grid;
  gap: 8px;
}

.athsp-field__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--athsp-text);
}

.athsp-field__input,
.ath-sp-picker__input,
.ath-sp-offer-catalog__label,
.ath-sp-offer-catalog__input,
.ath-sp-offer-catalog__notes {
  width: 100%;
  border: 1px solid var(--athsp-border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--athsp-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.athsp-field__input,
.ath-sp-picker__input,
.ath-sp-offer-catalog__label,
.ath-sp-offer-catalog__input {
  min-height: 44px;
  padding: 0 14px;
}

.ath-sp-offer-catalog__notes {
  min-height: 104px;
  padding: 12px 14px;
  resize: vertical;
}

.athsp-field__input:focus,
.ath-sp-picker__input:focus,
.ath-sp-offer-catalog__label:focus,
.ath-sp-offer-catalog__input:focus,
.ath-sp-offer-catalog__notes:focus {
  border-color: color-mix(in srgb, var(--athsp-accent) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--athsp-accent) 14%, white);
  outline: none;
}

.athsp-lookup {
  display: grid;
  gap: 12px;
}

.athsp-lookup__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.athsp-lookup__title {
  color: var(--athsp-text);
}

.athsp-lookup__description {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.athsp-lookup__clear,
.ath-sp-offer-catalog__clear {
  color: var(--athsp-accent-strong);
  text-decoration: none;
}

.athsp-selection-card,
.ath-sp-offer-catalog__selection {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--athsp-accent) 18%, var(--athsp-border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--athsp-accent) 7%, white);
}

.athsp-selection-card--empty,
.ath-sp-offer-catalog__selection--empty {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--athsp-border);
}

.athsp-selection-card__title,
.ath-sp-offer-catalog__selection-title {
  font-size: 15px;
  line-height: 1.35;
}

.athsp-selection-card__meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--athsp-accent-strong);
}

.athsp-toggle,
.ath-sp-offer-catalog__toggle {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
}

.athsp-toggle input,
.ath-sp-offer-catalog__toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.athsp-toggle__switch,
.ath-sp-offer-catalog__toggle-ui {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  transition: background 140ms ease;
}

.athsp-toggle__switch::after,
.ath-sp-offer-catalog__toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 140ms ease;
}

.athsp-toggle input:checked + .athsp-toggle__switch,
.ath-sp-offer-catalog__toggle input:checked + .ath-sp-offer-catalog__toggle-ui {
  background: linear-gradient(180deg, var(--athsp-accent), var(--athsp-accent-strong));
}

.athsp-toggle input:checked + .athsp-toggle__switch::after,
.ath-sp-offer-catalog__toggle input:checked + .ath-sp-offer-catalog__toggle-ui::after {
  transform: translateX(20px);
}

.athsp-toggle__text,
.ath-sp-offer-catalog__toggle-text {
  display: grid;
  gap: 2px;
}

.athsp-callout {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--athsp-accent) 28%, var(--athsp-border));
  background: color-mix(in srgb, var(--athsp-accent) 6%, white);
  font-size: 13px;
  line-height: 1.5;
}

.athsp-actions {
  align-items: center;
  margin: 0;
}

.ath-sp-picker {
  position: relative;
}

.ath-sp-picker__search {
  position: relative;
}

.ath-sp-picker__input {
  padding-right: 42px;
}

.ath-sp-picker__spinner {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: var(--athsp-accent);
  opacity: 0;
  animation: ath-sp-spin 800ms linear infinite;
}

.ath-sp-picker.is-loading .ath-sp-picker__spinner {
  opacity: 1;
}

@keyframes ath-sp-spin {
  to {
    transform: rotate(360deg);
  }
}

.ath-sp-picker__results {
  display: none;
  position: absolute;
  inset: calc(100% + 8px) 0 auto 0;
  z-index: 30;
  max-height: 300px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--athsp-border-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 36px rgba(15, 23, 42, 0.14);
}

.ath-sp-picker__results.is-open {
  display: block;
}

.ath-sp-result {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.ath-sp-result:last-child {
  border-bottom: 0;
}

.ath-sp-result:hover,
.ath-sp-result:focus {
  background: color-mix(in srgb, var(--athsp-accent) 10%, white);
  outline: none;
}

.ath-sp-result__title {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.ath-sp-result__meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--athsp-muted);
}

.ath-sp-chip {
  background: color-mix(in srgb, var(--athsp-accent) 10%, white);
  border-color: color-mix(in srgb, var(--athsp-accent) 20%, transparent);
  color: var(--athsp-accent-strong);
}

.ath-sp-chip__t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ath-sp-chip__x {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
}

.ath-sp-offer-catalog__msg {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--athsp-border);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.ath-sp-offer-catalog__msg--ok {
  border-color: color-mix(in srgb, var(--athsp-accent) 28%, transparent);
  background: color-mix(in srgb, var(--athsp-accent) 8%, white);
  color: var(--athsp-accent-strong);
}

.ath-sp-offer-catalog__msg--error {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.08);
  color: #8a4b08;
}

.ath-sp-offer-catalog__list {
  display: grid;
  gap: 14px;
}

.ath-sp-offer-catalog__row {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--athsp-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.ath-sp-offer-catalog__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ath-sp-offer-catalog__header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ath-sp-offer-catalog__header-actions .button,
.ath-sp-offer-catalog__header-actions .button-link {
  white-space: nowrap;
}

.ath-sp-offer-catalog__summary,
.ath-sp-offer-catalog__picker {
  display: grid;
  gap: 10px;
}

.ath-sp-offer-catalog__price,
.ath-sp-offer-catalog__lead-days,
.ath-sp-offer-catalog__tier-min,
.ath-sp-offer-catalog__tier-price {
  font-variant-numeric: tabular-nums;
}

.ath-sp-offer-catalog__price,
.ath-sp-offer-catalog__tier-price {
  text-align: right;
}

.ath-sp-offer-catalog__lead-days,
.ath-sp-offer-catalog__tier-min {
  text-align: center;
}

.ath-sp-offer-catalog__fields {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(140px, 0.5fr));
}

.ath-sp-offer-catalog__field--wide {
  grid-column: 1 / -1;
}

.ath-sp-offer-catalog__tier-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ath-sp-offer-catalog__tier-help {
  color: var(--athsp-text-soft);
  font-size: 12px;
}

.ath-sp-offer-catalog__tier-list {
  display: grid;
  gap: 8px;
}

.ath-sp-offer-catalog__tier {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(140px, 180px) auto;
  gap: 10px;
  align-items: center;
}

.ath-sp-offer-catalog__tier-remove {
  justify-self: start;
}

.ath-sp-offer-catalog__empty {
  padding: 22px 18px;
  border: 1px dashed var(--athsp-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

@media (max-width: 960px) {
  .athsp-editor__grid,
  .ath-sp-offer-catalog__fields,
  .ath-sp-offer-catalog__tier {
    grid-template-columns: 1fr;
  }

  .athsp-status,
  .ath-sp-offer-catalog__header,
  .ath-sp-offer-catalog__tier-head,
  .athsp-panel__head--spread {
    flex-direction: column;
    align-items: stretch;
  }

  .athsp-status__score {
    min-width: 0;
    width: fit-content;
  }
}



.ath-sp-offer-catalog__row--product {
  display: grid;
  gap: 16px;
}

.ath-sp-offer-catalog__summary--product {
  gap: 12px;
}

.ath-sp-offer-catalog__picker {
  min-width: min(420px, 100%);
}

.ath-sp-offer-catalog__variation-list {
  display: grid;
  gap: 12px;
}

.ath-sp-offer-catalog__variation {
  border: 1px solid var(--athsp-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.ath-sp-offer-catalog__variation.is-selected {
  border-color: var(--athsp-accent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ath-sp-offer-catalog__variation-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ath-sp-offer-catalog__variation-select {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ath-sp-offer-catalog__variation-select input {
  margin-top: 4px;
}

.ath-sp-offer-catalog__variation-select-text {
  display: grid;
  gap: 4px;
}

.ath-sp-offer-catalog__variation-select-text small {
  color: var(--athsp-text-soft);
}

.ath-sp-offer-catalog__variation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ath-sp-offer-catalog__variation-details {
  border-top: 1px solid var(--athsp-border);
  padding-top: 12px;
}

.ath-sp-offer-catalog__variation-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--athsp-text);
}

.ath-sp-offer-catalog__variation-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(140px, 0.5fr));
  gap: 14px;
  margin-top: 12px;
}

.ath-sp-offer-catalog__toggle--inline {
  grid-column: 1 / -1;
}

.ath-sp-offer-catalog__empty--inner {
  padding: 16px;
  border-radius: 16px;
}

.ath-sp-result--product .ath-sp-result__meta {
  display: block;
  margin-top: 4px;
}

@media (max-width: 960px) {
  .ath-sp-offer-catalog__variation-head,
  .ath-sp-offer-catalog__variation-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .ath-sp-offer-catalog__variation-fields {
    grid-template-columns: 1fr;
  }
}
