/* Labor Consultation intake - semantic tokens only */

.lc-section {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  padding: 3rem 5% 5rem;
}

.lc-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.lc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lc-intro {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.lc-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.lc-form fieldset {
  min-width: 0;
  margin: 0;
}

.lc-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 1.5rem 1.75rem 1rem;
  margin-bottom: 1.5rem;
}

.lc-legend {
  font-family: var(--heading);
  font-size: 1.5rem;
  color: var(--heading-color);
  padding: 0 0.5rem;
  margin-left: -0.5rem;
}

.lc-group {
  border: 0;
  padding: 0;
  margin-bottom: 1rem;
}

.lc-group > legend {
  padding: 0;
  margin-bottom: 0.45rem;
}

.lc-sublabel {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lc-short {
  min-height: 90px;
}

.lc-hint {
  margin: 0 0 0.6rem 1.1rem;
  padding: 0;
  list-style: disc;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.field-error {
  margin: 0.3rem 0 0;
  min-height: 0;
  font-size: 0.75rem;
  color: var(--accent-text);
}

.field-error:empty {
  display: none;
}

.lc-form .is-invalid,
.lc-form [aria-invalid="true"] {
  border-color: var(--heading-color);
}

.lc-form .field-error:not(:empty) {
  font-weight: 700;
}

/* File drop zones */
.lc-drop {
  border: 2px dashed var(--line);
  background: var(--bg-soft);
  padding: 1rem;
  transition: border-color 0.2s ease;
}

.lc-drop:hover,
.lc-drop:focus-within,
.lc-drop.is-dragover {
  border-color: var(--accent);
}

.lc-file {
  display: block;
  width: 100%;
  min-height: 44px;
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--text);
}

.lc-file-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.lc-file-list:empty {
  display: none;
}

.lc-file-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem;
  color: var(--text);
}

.lc-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lc-file-size {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.lc-file-remove {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--heading-color);
  font-family: var(--body);
  font-size: 0.8rem;
  cursor: pointer;
}

.lc-file-remove:hover,
.lc-file-remove:focus-visible {
  border-color: var(--accent);
}

/* Consent */
.lc-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  cursor: pointer;
}

.lc-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.2rem;
  accent-color: var(--btn-primary-bg);
}

/* Progress and status */
#lc-progress {
  margin-bottom: 1rem;
}

#lc-progress-bar {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: var(--btn-primary-bg);
}

#lc-progress-text {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#lc-status {
  margin-bottom: 1rem;
  color: var(--heading-color);
  font-size: 0.95rem;
}

#lc-status:empty {
  display: none;
}

#lc-status.is-error,
#lc-status.is-success {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 0.9rem 1rem;
}

.lc-submit {
  margin-top: 0.5rem;
  width: 100%;
  min-height: 48px;
}

.lc-submit[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Honeypot: hidden from sight and tab order (tabindex=-1 on the input) */
.lc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .lc-section {
    padding: 2rem 5% 4rem;
  }

  .lc-card {
    padding: 1.25rem 1rem 0.75rem;
  }

  .lc-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.lc-files-total {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lc-files-total:empty {
  display: none;
}

#lc-status a {
  color: var(--accent-text);
  font-weight: 700;
}

/* Send note and sending overlay */
.lc-send-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

body.lc-sending-open {
  overflow: hidden;
}

.lc-sending {
  position: fixed;
  inset: 0;
  z-index: 2000; /* above the site header (1200) so the menu can't be tapped mid-upload */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(42, 29, 18, 0.55);
  overflow-y: auto;
}

.lc-sending[hidden] {
  display: none;
}

.lc-sending-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(42, 29, 18, 0.3);
}

.lc-sending-card:focus {
  outline: none;
}

.lc-sending-card h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--heading-color);
}

.lc-sending-card #lc-progress {
  margin-bottom: 1rem;
}

.lc-sending-card #lc-progress-text {
  font-size: 1rem;
  text-align: center;
}

.lc-sending-card #lc-sending-msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.lc-spinner {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 0.9rem;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lc-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .lc-spinner {
    display: none;
    animation: none;
  }
}
