/* Weekly ritual agent surface (F3). Own file — do not add rules here that
   belong in the shell (style.css) or the onboarding seat. Reuses the shared
   .a-card / .a-field / .a-badge / .btn primitives defined in style.css. */

.wk-status {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 20px;
}

.wk-empty {
  text-align: center;
  color: var(--text-muted);
}

/* --- Card list --- */
.wk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wk-card-address {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.wk-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.wk-metric-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wk-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wk-metric-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.wk-metric-row.wk-metric-na .wk-metric-value {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

.wk-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.wk-confirmed {
  font-size: 0.85rem;
  color: #6ee7b7;
  font-weight: 600;
}

/* --- Review modal --- */
.wk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1900;
  padding: 24px 16px;
  overflow-y: auto;
}

.wk-modal-overlay.active {
  display: flex;
}

.wk-modal {
  background: #0f1523;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}

.wk-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.wk-modal-head h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.3;
}

.wk-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  /* ~44px tap target regardless of the glyph's own metrics. */
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-modal-close:hover {
  color: var(--text-main);
}

.wk-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wk-section h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.wk-section .wk-metric-grid {
  margin-top: 14px;
}

/* Price gate */
.wk-price-gate {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.wk-price-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.wk-price-value.wk-metric-na {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-dim);
}

.wk-price-source {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.wk-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
}

.wk-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

/* Manual inputs form */
.wk-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.wk-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.wk-radio-row input[type="radio"] {
  accent-color: var(--primary);
}

.wk-inputs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.wk-save-status {
  font-size: 0.85rem;
  color: #6ee7b7;
  font-weight: 600;
}

/* Listing links editor */
.wk-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.wk-links-empty,
.wk-links-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.wk-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.wk-link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wk-link-info .wk-link-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}

.wk-link-info .wk-link-url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.wk-link-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.wk-link-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.wk-link-form {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.wk-link-status {
  font-size: 0.85rem;
  color: #6ee7b7;
  font-weight: 600;
}

/* Named sharing (per-recipient engagement) — an optional, opt-in overlay on
   top of the anonymous share link, mirroring the listing-links editor's
   layout above so the two sections read as one family. */
.wk-recipients-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -4px 0 12px;
}

.wk-recipients-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.wk-recipients-empty,
.wk-recipients-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.wk-recipient-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.wk-recipient-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wk-recipient-name-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}

.wk-recipient-email-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.wk-recipient-engagement {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}

.wk-recipient-views {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.85rem;
}

.wk-recipient-last-viewed {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.wk-recipient-form {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.wk-recipient-status {
  font-size: 0.85rem;
  color: #6ee7b7;
  font-weight: 600;
}

/* Card preview */
.wk-card-preview {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
}

.wk-card-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 772px;
  height: 1000px;
  border: 0;
  transform-origin: top left;
}

.wk-confirmed-note {
  font-size: 0.9rem;
  color: #6ee7b7;
  font-weight: 600;
}

.wk-modal-foot {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-color);
}

.wk-confirm-btn {
  width: 100%;
}

.wk-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (min-width: 768px) {
  .wk-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Manage section (onboarded listings with no packet yet) --- */
.wk-manage-head {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.wk-manage-head h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-main);
  margin: 0 0 6px;
}

.wk-manage-hint {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.wk-manage-intro {
  margin-bottom: 8px;
}
