/* Shared styles for the agency tools: CMA, seller net sheet, listing flyer. */
:root { --tool-radius: 14px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: rgb(var(--c-background));
  color: rgb(var(--c-on-surface));
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.tool-card {
  background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-outline-variant));
  border-radius: var(--tool-radius);
}

.tool-input,
.tool-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  color: rgb(var(--c-on-surface));
  background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-outline-variant));
  border-radius: 8px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-input:focus,
.tool-select:focus {
  border-color: rgb(var(--c-primary-ink));
  box-shadow: 0 0 0 3px rgba(85, 34, 219, .10);
}
.tool-input:disabled { opacity: .55; }

.tool-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgb(var(--c-text-muted));
  margin-bottom: 5px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
}
.tool-btn-primary { background: rgb(var(--c-primary)); color: rgb(var(--c-on-primary)); }
.tool-btn-primary:hover { background: rgb(var(--c-primary-dark)); }
.tool-btn-ghost {
  background: rgb(var(--c-surface));
  color: rgb(var(--c-on-surface));
  border-color: rgb(var(--c-outline-variant));
}
.tool-btn-ghost:hover { border-color: rgb(var(--c-primary-ink)); color: rgb(var(--c-primary-ink)); }
.tool-btn:disabled { opacity: .5; cursor: not-allowed; }

.comps-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.comps-table th {
  position: sticky;
  top: 0;
  background: rgb(var(--c-surface-container));
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgb(var(--c-text-muted));
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgb(var(--c-outline-variant));
  white-space: nowrap;
}
.comps-table td {
  padding: 6px;
  border-bottom: 1px solid rgb(var(--c-outline-variant));
  vertical-align: middle;
}
.comps-table .tool-input,
.comps-table .tool-select { padding: 6px 7px; font-size: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.chip-sample { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.chip-live { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.summary-value { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.conf-bar {
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--c-surface-container));
  overflow: hidden;
}
.conf-fill { height: 100%; border-radius: 999px; background: rgb(var(--c-primary)); }

.error-box {
  display: none;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}
.error-box.show { display: block; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgb(var(--c-outline-variant));
  color: rgb(var(--c-on-surface-variant));
  background: rgb(var(--c-surface));
}
.tabs a.active {
  background: rgb(var(--c-primary));
  color: rgb(var(--c-on-primary));
  border-color: rgb(var(--c-primary-ink));
}

/* ------------------------------------------------------------- flyer --- */
.flyer-sheet {
  width: 100%;
  max-width: 612px;
  aspect-ratio: 8.5 / 11;
  background: #ffffff;
  color: #171717;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .10);
  display: flex;
  flex-direction: column;
}
.flyer-photo {
  position: relative;
  height: 46%;
  background: linear-gradient(135deg, #240952, #5522DB);
  overflow: hidden;
}
.flyer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flyer-photo .flyer-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .75);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.flyer-badge {
  position: absolute;
  left: 20px;
  bottom: 16px;
  background: #ffffff;
  color: #240952;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.flyer-body { padding: 20px 24px 16px; display: flex; flex-direction: column; flex: 1; }
.flyer-kicker { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #5522DB; }
.flyer-address { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.flyer-meta { margin-top: 10px; display: flex; gap: 18px; flex-wrap: wrap; }
.flyer-meta .n { font-size: 15px; font-weight: 800; }
.flyer-meta .l { font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #737373; }
.flyer-headline { margin-top: 12px; font-size: 12px; font-weight: 700; color: #171717; }
.flyer-desc { margin-top: 6px; font-size: 10px; line-height: 1.5; color: #525252; flex: 1; overflow: hidden; }
.flyer-features { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.flyer-features span { font-size: 8.5px; font-weight: 600; border: 1px solid #e5e5e5; border-radius: 999px; padding: 3px 8px; color: #404040; }
.flyer-agent {
  margin-top: 14px;
  border-top: 1px solid #e5e5e5;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.flyer-agent .name { font-size: 10px; font-weight: 800; color: #171717; }
.flyer-agent .line { font-size: 8.5px; color: #737373; }
.flyer-brand { font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #5522DB; text-align: right; }

@media print {
  header, footer, .no-print, .tabs { display: none !important; }
  body { background: #fff; }
  main { max-width: 100% !important; padding: 0 !important; }
  .tool-card { box-shadow: none; }
  .flyer-sheet { box-shadow: none; border: none; max-width: 100%; }
  .print-full { display: block !important; }
}
