/* a settings row that is a link (Privacy, Help) */
a.row-link { color: inherit; text-decoration: none; }
.login-footnote a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Settings -> Web shop (webshop.js) ----------
   On top of css/ios.css: the same cards, rows, fields and chips - only what the
   web shop adds (its link, thumbnails, the picker's checks, the QR card). */

/* online: a soft green-to-teal glow over the card, no border */
.ws-status.on {
  background:
    radial-gradient(130% 150% at 0% 0%, color-mix(in srgb, var(--success) 16%, transparent) 0%, transparent 62%),
    radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, #30B0C7 13%, transparent) 0%, transparent 66%),
    var(--bg-elevated);
}
.ws-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 14px 16px;
}
.ws-link a { padding-left: 42px; }
/* the address in the text colour (readable on the card's glow), a link by its underline */
.ws-link a {
  color: var(--label);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--tint) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.ws-link-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ws-link-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 8px;
  white-space: nowrap;
  border: none;
  border-radius: 980px;
  background: var(--fill-secondary);
  color: var(--label);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ws-link-actions button i { font-size: 16px; color: var(--tint); }
.ws-link-actions button:active { opacity: 0.6; }
.ws-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 4px 0;
  color: var(--label-secondary);
  font-size: 13px;
}
.ws-group-label { display: flex; align-items: baseline; gap: 10px; }
.ws-hint { text-transform: none; letter-spacing: 0; font-size: 12px; }
.ws-hint.warn { color: var(--warning); }
.ws-action { color: var(--tint); }
.row[aria-disabled="true"] { opacity: 0.45; }
.row-value.ws-missing { color: var(--destructive); }
.row-value.ws-value { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-dim .row-title { color: var(--label-secondary); }
.ws-product-row.unavailable .row-title { color: var(--label-secondary); text-decoration: line-through; }
.ws-product-row.unavailable .row-subtitle { color: var(--warning); }

.ws-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--fill-secondary);
}
.ws-thumb img, .ws-photo-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-thumb.empty, .ws-photo-inner.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--g, #8e8e93) 16%, var(--bg-elevated));
  color: var(--g, var(--label-secondary));
  font-size: 20px;
}

/* the shop page form */
.field textarea {
  width: 100%;
  min-height: 66px;
  border: none;
  background: none;
  outline: none;
  resize: vertical;
  font-size: 17px;
  line-height: 1.35;
  color: var(--label);
  font-family: inherit;
  padding: 0;
}
.field textarea::placeholder { color: var(--label-tertiary); }
.ws-slug-input { display: flex; align-items: baseline; min-width: 0; }
.ws-slug-input span { flex-shrink: 1; min-width: 0; color: var(--label-secondary); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-slug-input input { flex: 1 0 120px; min-width: 120px; }

/* picking products */
.ws-picker-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 14px; padding: 0 2px; }
.ws-picker-cats::-webkit-scrollbar { display: none; }
.ws-picker-cats .chip-option { flex-shrink: 0; }
.ws-pick { min-height: 58px; }
.ws-pick.off { opacity: 0.5; }
.ws-pick-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--g, var(--fill-secondary)); flex-shrink: 0; }
.ws-check {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--separator-opaque);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 15px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ws-check.on { background: var(--tint); border-color: var(--tint); color: #fff; }
.ws-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px 4px;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--tint);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ws-select-all[disabled] { opacity: 0.5; }
.ws-picker-end { min-height: 24px; }
#wsPickerDoneBtn .spinner { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }

/* one product */
.ws-photo {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  margin: 4px auto 14px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ws-photo-inner { display: flex; width: 100%; height: 100%; }
.ws-photo-inner.empty { font-size: 64px; }
.ws-photo-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.ws-photo-actions .btn-secondary { width: auto; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; }
.ws-photo-actions .ws-danger { color: var(--destructive); }
.ws-remove-btn {
  width: 100%;
  border: none;
  background: var(--fill-secondary);
  border-radius: 980px;
  padding: 15px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
  font-family: inherit;
}

/* a choice of a few: equal tiles instead of chips that wrap */
.ws-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ws-choice-grid .chip-option { padding: 12px 10px; font-size: 15px; }
.ws-kind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ws-kind-grid .chip-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
}
.ws-kind-grid .chip-option .chip-icon { margin: 0; font-size: 22px; }

/* a promotion */
.ws-scope-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.ws-scope-row .field-label { margin: 0 4px; }
.seg-option[disabled] { opacity: 0.35; cursor: default; }
#wsPromoProducts .card, #wsPromoProducts .empty-state { margin-bottom: 14px; }

/* the QR code: always dark on white, also in dark mode - it has to scan */
.ws-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 420px;
  margin: 8px auto 0;
  padding: 30px 26px 26px;
  border-radius: 26px;
  background: #fff;
  color: #1d1b18;
  box-shadow: var(--shadow);
  text-align: center;
}
.ws-qr-title { font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.ws-qr-code { width: min(100%, 300px); aspect-ratio: 1 / 1; }
.ws-qr-code svg { width: 100%; height: 100%; display: block; }
.ws-qr-url { font-size: 14px; font-weight: 600; color: #57524a; overflow-wrap: anywhere; }

/* the page's background */
.ws-theme-value { display: inline-flex; align-items: center; gap: 8px; }
.ws-theme-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.35); }
.ws-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .ws-theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.ws-theme { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--label); text-align: center; cursor: pointer; }
.ws-theme-page {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.28); transition: box-shadow 0.15s ease;
}
.ws-theme.on .ws-theme-page { box-shadow: 0 0 0 3px var(--tint); }
.ws-theme-card {
  position: relative; display: flex; align-items: center; justify-content: center; width: 58%; aspect-ratio: 1;
  border-radius: 14px; font-size: 22px; font-weight: 750; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ws-theme-card i { position: absolute; right: 9px; bottom: 9px; width: 10px; height: 10px; border-radius: 50%; }
.ws-theme-name { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 22px; font-size: 14.5px; font-weight: 600; }
.ws-theme.on .ws-theme-name { color: var(--tint); }
