/* Mapped to the site tokens in css/style.css; literals are the fallback if this
   file is ever loaded without it. */
.vz {
  --vz-ink: var(--green-dark, #303823);
  --vz-muted: #75806b;
  --vz-line: var(--border-light, #e4e8df);
  --vz-surface: #ffffff;
  --vz-tint: var(--green-light, #eef4e6);
  --vz-accent: var(--green-primary, #648e37);
  --vz-accent-hover: var(--green-hover, #527230);
  --vz-accent-ink: #ffffff;
  --vz-error: #8a2f2f;
  --vz-radius: 14px;

  padding: 112px 16px 56px; /* clears the fixed-top navbar */
  color: var(--vz-ink);
}

.vz-shell {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vz-line);
  border-radius: var(--vz-radius);
  background: var(--vz-surface);
  overflow: hidden;
}

.vz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--vz-line);
}

.vz-head h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.vz-quota {
  margin: 0;
  font-size: 0.875rem;
  color: var(--vz-muted);
  white-space: nowrap;
}

.vz-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  max-height: 62vh;
  padding: 20px;
  overflow-y: auto;
  background: var(--vz-tint);
}

.vz-msg {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: var(--vz-radius);
  line-height: 1.45;
}

.vz-msg p { margin: 0; }
.vz-msg p + p { margin-top: 6px; }

.vz-msg--bot {
  align-self: flex-start;
  background: var(--vz-surface);
  border: 1px solid var(--vz-line);
  border-bottom-left-radius: 4px;
}

.vz-msg--user {
  align-self: flex-end;
  background: var(--vz-accent);
  color: var(--vz-accent-ink);
  border-bottom-right-radius: 4px;
}

.vz-msg--pending p { color: var(--vz-muted); }
.vz-msg--pending p::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: vz-spin 0.8s linear infinite;
}

@keyframes vz-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .vz-msg--pending p::after { animation: none; }
}

.vz-thumb {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.vz-caption { font-weight: 500; }
.vz-note-text { font-size: 0.875rem; opacity: 0.85; }

.vz-msg--result { max-width: 100%; }

.vz-result {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.vz-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--vz-tint);
  font-size: 0.9rem;
}

.vz-save p { flex: 1 1 260px; }

.vz-download {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--vz-accent);
  color: var(--vz-accent-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.vz-download:hover,
.vz-download:focus-visible { background: var(--vz-accent-hover); color: var(--vz-accent-ink); }

.vz-disclaimer {
  margin-top: 8px !important;
  font-size: 0.8rem;
  color: var(--vz-muted);
}

.vz-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--vz-line);
}

.vz-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.vz-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* display:flex above outranks the UA [hidden] rule, so state it explicitly —
   the Color field is hidden for products with no colour images. */
.vz-field[hidden] { display: none; }
.vz-field span { font-size: 0.8rem; color: var(--vz-muted); }

.vz-field select,
.vz-note {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--vz-line);
  border-radius: 10px;
  background: var(--vz-surface);
  color: var(--vz-ink);
  font: inherit;
}

.vz-field select:focus,
.vz-note:focus {
  outline: none;
  border-color: var(--vz-accent);
  box-shadow: 0 0 0 3px rgba(47, 93, 68, 0.15);
}

.vz-attached {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--vz-line);
  border-radius: 10px;
  font-size: 0.875rem;
}

.vz-attached[hidden] { display: none; }

.vz-attached img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.vz-attached span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vz-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--vz-tint);
  color: var(--vz-ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.vz-bar { display: flex; gap: 8px; }

.vz-attach {
  position: relative;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  height: 44px;
  border: 1px solid var(--vz-line);
  border-radius: 10px;
  color: var(--vz-accent);
  cursor: pointer;
}

.vz-attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.vz-attach:focus-within { border-color: var(--vz-accent); }

.vz-send {
  flex: 0 0 auto;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--vz-accent);
  color: var(--vz-accent-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.vz-send:hover:not(:disabled) { background: var(--vz-accent-hover); }

.vz-compose :disabled { opacity: 0.55; cursor: not-allowed; }

.vz-error {
  margin: 0;
  font-size: 0.875rem;
  color: var(--vz-error);
}

@media (max-width: 575.98px) {
  .vz { padding: 88px 0 32px; }
  .vz-shell { border-radius: 0; border-left: 0; border-right: 0; }
  .vz-selects { grid-template-columns: 1fr; }
  .vz-head { flex-direction: column; gap: 2px; }
  .vz-msg { max-width: 92%; }
}
