/* Paste-to-track widget — the "No extension needed, paste a product link" form.
 *
 * Rendered on five surfaces that each ship their own stylesheet: the homepage,
 * /p/ hub, /p/<site>/<key>, the dark-themed /<store>-price-tracker landing
 * pages, and /account.php. Every rule is therefore namespaced under .pdc-ptt
 * and written as a descendant selector, so page rules like `.store-live h2` or
 * a global `input {}` can't win on specificity and repaint the widget.
 *
 * Markup comes from lib/paste-to-track.php (PHP pages) or is hand-written in
 * index.html; behavior lives in /paste-to-track.js. Keep the class names in
 * all three in sync.
 */

.pdc-ptt {
  box-sizing: border-box;
  margin: 24px 0;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e2cdf0;
  border-radius: 14px;
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}
.pdc-ptt *,
.pdc-ptt *::before,
.pdc-ptt *::after { box-sizing: border-box; }

.pdc-ptt .pdc-ptt-title {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 4px;
  padding: 0;
  color: #1a1a1a;
  text-align: inherit;
  letter-spacing: -0.01em;
}
.pdc-ptt .pdc-ptt-hint {
  margin: 0 0 14px;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #777;
  max-width: none;
}
.pdc-ptt .pdc-ptt-hint a { color: #7B2FAE; font-weight: 600; }

.pdc-ptt .pdc-ptt-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.pdc-ptt .pdc-ptt-col-url { flex: 1 1 300px; min-width: 0; }
.pdc-ptt .pdc-ptt-col-target { flex: 0 0 140px; }
.pdc-ptt .pdc-ptt-col-submit { flex: 0 0 auto; }

.pdc-ptt .pdc-ptt-label {
  display: block;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #666;
  margin: 0 0 5px;
  text-transform: none;
  letter-spacing: 0;
}

.pdc-ptt .pdc-ptt-field {
  width: 100%;
  margin: 0;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  color: #222;
  background: #fff;
  border: 1.5px solid #d9c2e8;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.pdc-ptt .pdc-ptt-field:focus {
  outline: none;
  border-color: #7B2FAE;
  box-shadow: 0 0 0 3px rgba(123, 47, 174, 0.12);
}
.pdc-ptt .pdc-ptt-field::placeholder { color: #bbb; opacity: 1; }

.pdc-ptt .pdc-ptt-submit {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  color: #fff;
  background: #7B2FAE;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-transform: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.pdc-ptt .pdc-ptt-submit:hover { background: #6a2896; }
.pdc-ptt .pdc-ptt-submit:active { transform: scale(0.97); }
.pdc-ptt .pdc-ptt-submit[disabled] { opacity: 0.55; cursor: default; transform: none; }

.pdc-ptt .pdc-ptt-note {
  margin: 10px 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #999;
}
.pdc-ptt .pdc-ptt-msg {
  margin: 12px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}
.pdc-ptt .pdc-ptt-msg[hidden] { display: none; }
.pdc-ptt .pdc-ptt-msg.is-error { color: #b42318; }
.pdc-ptt .pdc-ptt-msg.is-ok { color: #1a8c52; }
.pdc-ptt .pdc-ptt-msg a { color: inherit; font-weight: 600; }

/* ── Variant: product page ("watch this product", no URL to paste) ───────── */
.pdc-ptt--product { background: #fbf7fe; }
.pdc-ptt--product .pdc-ptt-col-target { flex: 0 0 160px; }

/* ── Variant: centered hero (homepage, /p/ hub, store landing) ───────────── */
.pdc-ptt--hero {
  max-width: 680px;
  margin: 28px auto;
  text-align: center;
}
.pdc-ptt--hero .pdc-ptt-form { justify-content: center; text-align: left; }

/* ── Variant: quiet secondary CTA under an "Install" button ──────────────── */
.pdc-ptt--slim { padding: 16px 18px; }
.pdc-ptt--slim .pdc-ptt-title { font-size: 15px; }

@media (max-width: 620px) {
  .pdc-ptt { padding: 16px; }
  .pdc-ptt .pdc-ptt-form { gap: 8px; }
  .pdc-ptt .pdc-ptt-col-url,
  .pdc-ptt .pdc-ptt-col-target,
  .pdc-ptt .pdc-ptt-col-submit { flex: 1 1 100%; }
  .pdc-ptt .pdc-ptt-submit { width: 100%; }
  /* The spacer that keeps the button aligned with labelled inputs is only
     useful while they share a row. */
  .pdc-ptt .pdc-ptt-col-submit .pdc-ptt-label { display: none; }
}
