/*
  SFS forms: inputs, selects, labels, fields, and form rows.
  Button-like selects must remain select-specific.
  Docs: _deploy/css-compartmentalisation-readable-map-20260704.md
  Related: _deploy/css-compartmentalisation-worklog-20260704.md; _deploy/css-compartmentalisation-verification-20260704.md
*/

/* Forms: compact task blocks. */
form {
  margin: 12px 0 18px;
}

main > form,
.content > form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

label {
  display: block;
  margin: 0 0 11px;
  color: #4f5964;
  font-weight: 650;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  max-width: 720px;
  margin-top: 4px;
  padding: 8px 9px;
  border: 1px solid #cfd6dc;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(52, 95, 125, 0.18);
  border-color: var(--brand);
}

input.wide {
  max-width: 100%;
}

/* Inline forms inside tables should not become large panels. */
td form,
table form {
  display: inline;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Browser dark mode form tuning. */
@media (prefers-color-scheme: dark) {
  input,
  select,
  textarea {
    background: var(--surface-soft);
    color: var(--text);
    border-color: var(--line);
  }
}
/* Large-upload activity overlay shared by public and admin upload forms. */
body.large-upload-active {
  overflow: hidden;
}

.large-upload-status {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.large-upload-status[hidden] {
  display: none;
}

.large-upload-status__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 9, 0.76);
  backdrop-filter: blur(4px);
}

.large-upload-status__panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(31rem, 100%);
  box-sizing: border-box;
  padding: 1.2rem 1.3rem;
  border: 1px solid color-mix(in srgb, var(--brand-line) 70%, var(--line));
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.large-upload-status__panel h2 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1.05rem;
}

.large-upload-status__panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.large-upload-status__spinner {
  box-sizing: border-box;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border: 3px solid color-mix(in srgb, var(--brand-strong) 24%, transparent);
  border-top-color: var(--brand-strong);
  border-radius: 50%;
  animation: large-upload-spin 0.85s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .large-upload-status__spinner {
    animation-duration: 1.8s;
  }
}
