/* ch_returns_card_html (HTML form). Head-linked from anvil.yaml native_deps.head_html.
   Root: <div class="ch-card rs-returns-card" id="returns-card">. Rules scope on the private
   .rs-returns-card class. */

.rs-returns-card .rs-deadline-note {
  background: var(--ch-warning-bg);
  border-left-color: var(--ch-warning);
}

:where(.rs-returns-card) .ch-disabled-tooltip {
  text-align: center;
  font-size: 12px;
  color: var(--ch-text-muted);
  margin-top: 8px;
}

.rs-returns-card .rs-pack-box h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ch-accent-primary-text);
}

.rs-returns-card .rs-pack-box p {
  margin: 8px 0 0;
}

.rs-returns-card .rs-help {
  font-size: 13px;
  color: var(--ch-text-secondary);
  margin: 0 0 10px;
  line-height: 1.45;
}

.rs-returns-card .rs-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.rs-returns-card .rs-photos:empty {
  display: none;
}

.rs-returns-card .rs-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: var(--ch-radius-md);
  overflow: hidden;
  border: 1px solid var(--ch-border);
  background: var(--ch-bg-secondary);
}

.rs-returns-card .rs-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rs-returns-card .rs-thumb-nopreview {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  height: 100%;
  padding: 6px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ch-text-secondary);
}

.rs-returns-card .rs-thumb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--ch-text-primary);
}

.rs-returns-card .rs-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 22px;
  line-height: 40px;
  padding: 0;
  cursor: pointer;
}

.rs-returns-card .rs-thumb-remove:focus-visible {
  outline: 2px solid var(--ch-accent-primary);
  outline-offset: 1px;
}

.rs-returns-card .rs-pick-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.rs-returns-card .rs-pick-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  border: 2px dashed var(--ch-border);
  border-radius: var(--ch-radius-md);
  background: var(--ch-bg-card);
  color: var(--ch-text-secondary);
  font: 500 14px var(--ch-font-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.rs-returns-card .rs-pick-btn svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: var(--ch-accent-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rs-returns-card .rs-pick-btn:focus-within {
  outline: 2px solid var(--ch-accent-primary);
  outline-offset: 2px;
}

.rs-returns-card .rs-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.rs-returns-card .rs-busy .rs-pick-btn,
.rs-returns-card .rs-busy .rs-thumb-remove {
  opacity: 0.6;
}

.rs-returns-card .rs-count {
  font-size: 12px;
  color: var(--ch-text-muted);
  margin-top: 8px;
}

.rs-returns-card .rs-count:empty,
.rs-returns-card .rs-error:empty {
  display: none;
}

.rs-returns-card .rs-error {
  font-size: 13px;
  color: var(--ch-danger);
  margin-top: 6px;
  font-weight: 500;
}

.rs-returns-card .rs-invalid .rs-pick-btn {
  border-color: var(--ch-danger);
  background: var(--ch-danger-bg);
  color: var(--ch-danger);
}

.rs-returns-card .rs-invalid .rs-pick-btn svg {
  stroke: var(--ch-danger);
}
