/* The Submit page (model-form.html), its thank-you page (submit-success.html) and blocked page (submit-blocked.html).
   The form: a "check the catalog first" search, the kind switch, fields, people chips and the photo drop zone
   (js/pages/submit.js). Contact us (contact.html, contact-sent.html) uses the same form and thank-you card. */

.sm-page {
  padding-bottom: 56px;
}

[data-kind][hidden] {
  display: none !important;
}

.sm {
  max-width: 760px;
  margin-top: 8px;
}

.sm-title {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.15;
}

.sm-lead {
  margin: 6px 0 18px;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.sm-check {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sm-check label {
  line-height: 1.5;
}

.sm-check__row {
  display: flex;
  gap: 10px;
}

.sm-check__row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.sm-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
}

.sm-legend {
  margin: 0;
  color: var(--text-muted);
  font-size: .875rem;
}

.sm-req {
  margin-left: 3px;
  color: var(--danger);
  font-weight: 700;
}

.sm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sm-field label,
.sm-label,
.sm-field legend {
  padding: 0;
  font-weight: 600;
}

.sm-kind legend {
  margin-bottom: 8px;
}

.sm-optional {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 400;
}

.sm-field input[type=text],
.sm-field input[type=email],
.sm-field select,
.sm-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

/* components/utilities.css still makes every select Montserrat 600 (!important) for the old pages. */
.sm-field select {
  font-family: inherit !important;
  font-weight: 400 !important;
}

.sm-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.sm-field input:focus,
.sm-field select:focus,
.sm-field textarea:focus,
.sm-check__row input:focus {
  border-color: var(--focus-ring);
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.sm-field [aria-invalid="true"] {
  border-color: var(--danger);
}

.sm-help {
  margin: 0;
  color: var(--text-muted);
  font-size: .875rem;
}

.sm-help--row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* The character counter ("0 / 500") stays on one line */
.sm-help--row > :last-child {
  flex: none;
  white-space: nowrap;
}

.sm-error {
  margin: 0;
  color: var(--danger);
  font-size: .875rem;
  font-weight: 600;
}

.sm-error[hidden] {
  display: none;
}

.sm-seg {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
}

.sm-seg label {
  position: relative;
}

.sm-seg input {
  position: absolute;
  opacity: 0;
}

.sm-seg span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.sm-seg input:checked + span {
  background: var(--accent);
  color: #fff;
}

.sm-seg input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sm-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.sm-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 10px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  background: var(--surface);
}

.sm-chips:focus-within {
  border-color: var(--focus-ring);
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.sm-field .sm-chips input[type=text] {
  flex: 1;
  min-width: 180px;
  min-height: 34px;
  padding: 4px;
  border: 0;
  outline: 0;
}

.sm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: .9375rem;
}

.sm-chip button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

/* .sm-field label sets padding 0, so the drop zone needs the extra class to keep its own. */
.sm-field .sm-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  border: 2px dashed var(--control-border);
  border-radius: var(--radius-lg);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.sm-field .sm-drop:hover,
.sm-field .sm-drop.is-over {
  border-color: var(--link);
}

.sm-field:has(#sm-files:focus-visible) .sm-drop {
  border-color: var(--focus-ring);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sm-drop .icon {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
}

.sm-drop__help {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.5;
}

.sm-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.sm-previews:empty {
  display: none;
}

.sm-previews li {
  position: relative;
}

.sm-previews img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  object-fit: cover;
}

.sm-previews button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.sm-send {
  align-self: flex-start;
  min-width: 200px;
}

.sm-muted {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.sm-note {
  max-width: 640px;
  margin-top: 24px;
}

.sm-note__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 22px;
  text-align: center;
}

.sm-note__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success-soft);
}

.sm-note__icon .icon {
  width: 28px;
  height: 28px;
  color: var(--success);
}

.sm-note__icon--blocked {
  background: var(--warn-soft);
}

.sm-note__icon--blocked .icon {
  color: var(--text);
}

.sm-note__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.75rem;
}

.sm-note__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .sm-page {
    padding-bottom: 72px;
  }
}

@media (max-width: 767px) {
  .sm-send {
    align-self: stretch;
  }

  .sm-note__actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}
