/* DFO Watch V1 (2026-09-24). Neutral surfaces like the rest of the product; the violet
   (--brand-primary) appears only where the user interacts - a chosen chip, a hovered CTA, the
   primary button. No advertising fills, and dark mode inherits the same tokens. */

.watch-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.watch-cta:hover { border-color: var(--brand-primary, #1f4d3a); color: var(--brand-primary, #1f4d3a); }
.watch-cta:focus-visible { outline: 2px solid var(--brand-primary, #1f4d3a); outline-offset: 2px; }
.watch-cta.is-watched { border-color: var(--brand-primary, #1f4d3a); color: var(--brand-primary, #1f4d3a); }
.watch-cta-icon { width: 15px; height: 15px; flex: 0 0 auto; }

/* The CTA sits with the card's other secondary actions and must never outweigh the name or price. */
.project-card .watch-cta { margin-top: 10px; }
.detail-tags .watch-cta { font-size: 12.5px; }

/* ---- modal ------------------------------------------------------------------------------- */

.watch-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center;
  justify-content: center; padding: 20px; }
.watch-modal-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 14, .48); }
.watch-modal-panel { position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px);
  overflow-y: auto; padding: 22px; border-radius: var(--radius-card); background: var(--surface);
  border: 1px solid var(--border); }
.watch-modal-panel:focus { outline: none; }
.watch-modal-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 20px;
  line-height: 1; cursor: pointer; }
.watch-modal-close:hover { background: var(--surface-2); color: var(--ink); }
.watch-modal-title { margin: 0 34px 16px 0; font-size: 17px; line-height: 1.3; color: var(--ink); }

.watch-fieldset { margin: 0 0 16px; padding: 0; border: 0; }
.watch-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.watch-field { margin-bottom: 16px; }
.watch-checks { display: flex; flex-direction: column; gap: 9px; }
.watch-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink);
  cursor: pointer; }
.watch-check input { width: 16px; height: 16px; accent-color: var(--brand-primary, #1f4d3a);
  cursor: pointer; }

.watch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-chip { padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.watch-chip:hover { border-color: var(--brand-primary, #1f4d3a); color: var(--brand-primary, #1f4d3a); }
.watch-chip.is-active { border-color: var(--brand-primary, #1f4d3a);
  color: var(--brand-primary, #1f4d3a); font-weight: 600; }

.watch-price { display: flex; align-items: center; gap: 8px; }
.watch-input { flex: 1 1 auto; min-width: 0; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.watch-input:focus { border-color: var(--brand-primary, #1f4d3a); outline: none; }
.watch-price-unit { color: var(--ink-2); font-weight: 600; }
.watch-channel { font-size: 14px; color: var(--ink); }

.watch-submit { display: inline-block; padding: 11px 18px; border: 0; border-radius: 999px;
  background: var(--brand-primary, #1f4d3a); color: #fff; font: inherit; font-size: 14px;
  font-weight: 600; text-decoration: none; cursor: pointer; }
.watch-submit:hover { filter: brightness(1.06); }
.watch-submit:disabled { opacity: .55; cursor: default; filter: none; }

.watch-error { margin: 0 0 14px; font-size: 13.5px; line-height: 1.45; color: var(--bad, #b3261e); }
.watch-error[hidden] { display: none; }
.watch-error-retry { padding: 0; border: 0; background: none; color: var(--brand-primary, #1f4d3a);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

.watch-state-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.watch-state-text { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
/* The small print under «Открыть Telegram»: where to change or stop the watch later. */
/* The recap on the connect screen: what was chosen, before any of it can arrive. */
.watch-summary { margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface-2); }
.watch-summary-target { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.watch-summary-filters { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.watch-summary-lead { margin: 10px 0 4px; font-size: 13px; color: var(--ink-2); }
.watch-summary-events { margin: 0; padding-left: 18px; font-size: 13.5px;
  line-height: 1.6; color: var(--ink); }

.watch-state-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5;
  color: var(--ink-2); }

.watch-state-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.watch-action { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; }
.watch-action:hover { border-color: var(--brand-primary, #1f4d3a); color: var(--brand-primary, #1f4d3a); }
.watch-action:disabled { opacity: .55; cursor: default; }
.watch-action-danger:hover { border-color: var(--bad, #b3261e); color: var(--bad, #b3261e); }

/* ---- «Я слежу» --------------------------------------------------------------------------- */

.watch-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.watch-card { padding: 18px; }
.watch-card-title { margin: 0 0 6px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.watch-card-filters { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
.watch-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.watch-tag { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; color: var(--ink-2); }
.watch-card-state { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.watch-card-state-pending { color: var(--bad, #b3261e); }
.watch-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-card-error { margin: 10px 0 0; font-size: 13px; color: var(--bad, #b3261e); }

.watch-empty { padding: 40px 20px; text-align: center; }
.watch-empty-title { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--ink); }
.watch-empty-text { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* ---- mobile: the modal becomes a bottom sheet, which is what a thumb expects --------------- */

@media (max-width: 640px) {
  .watch-modal { align-items: flex-end; padding: 0; }
  .watch-modal-panel { width: 100%; max-height: 88vh; padding: 20px 16px 24px;
    border-radius: 18px 18px 0 0; border-bottom: 0; }
  .watch-modal-title { margin-right: 30px; font-size: 16px; }
  .watch-check { min-height: 32px; }          /* comfortable touch target */
  .watch-chip { padding: 9px 15px; }
  .watch-submit { width: 100%; text-align: center; padding: 13px 18px; }
  .watch-state-actions .watch-action,
  .watch-card-actions .watch-action { flex: 1 1 auto; text-align: center; padding: 10px 12px; }
  .watch-list { grid-template-columns: minmax(0, 1fr); }
}

/* V4: buttons are 10px controls, not pills (pills stay for chips/badges). */
.watch-cta,.watch-submit,.watch-action{border-radius:10px;}
