/* LandForms - Global Styles */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "DM Serif Display", serif;
}

body {
  font-family: "Inter", sans-serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scroll reveal for homepage sections */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #faf6f0;
}
::-webkit-scrollbar-thumb {
  background: #c4d4c0;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a898;
}

/* Map styles */
#map-container {
  position: relative;
}
#map-container .gm-style {
  border-radius: 12px;
}

/* Search dropdown */
.lmm-search-container {
  position: relative;
}
.lmm-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e0d8;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
}
.lmm-search-dropdown.active {
  display: block;
}

.lmm-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.lmm-search-result:hover,
.lmm-search-result.selected {
  background: #f0f7f0;
}

.lmm-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.lmm-result-icon.state {
  background: #e8f0e7;
  color: #2c3a28;
}
.lmm-result-icon.county {
  background: #fef3c7;
  color: #d97706;
}
.lmm-result-icon.township {
  background: #d1fae5;
  color: #059669;
}
.lmm-result-icon.section {
  background: #ede9fe;
  color: #7c3aed;
}

.lmm-result-name {
  font-weight: 500;
  font-size: 14px;
  color: #1f2937;
}
.lmm-result-meta {
  font-size: 12px;
  color: #9ca3af;
}

/* Boundary tooltip */
#boundaryTooltip {
  display: none;
  position: absolute;
  background: rgba(30, 30, 30, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 200;
  white-space: nowrap;
}

/* CDL zoom warning */
.cdl-zoom-warning {
  display: none;
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 100;
  white-space: nowrap;
}

/* Map layer controls */
.map-layer-btn {
  background: white;
  border: 1px solid #e5e0d8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #1f2937;
}
.map-layer-btn:hover {
  background: #f0f7f0;
  border-color: #4a6741;
}
.map-layer-btn .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  transition: background 0.15s;
}
.map-layer-btn .indicator.active {
  background: #10b981;
}

/* Form builder — Airtable-inspired setup workspace */

#form-builder-page {
  background:
    radial-gradient(
      circle at top left,
      rgba(74, 103, 65, 0.08),
      transparent 32rem
    ),
    linear-gradient(180deg, #fbfaf7 0%, #f8fafc 44%, #f9fafb 100%);
  min-height: calc(100vh - 1px);
}

#form-builder-page .builder-section {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 30px rgba(15, 23, 42, 0.035);
}

.builder-sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  animation: slideUpBanner 0.22s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes slideUpBanner {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.builder-hero {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96),
      rgba(250, 246, 240, 0.92)
    ),
    radial-gradient(
      circle at 85% 20%,
      rgba(212, 101, 47, 0.12),
      transparent 18rem
    );
  border: 1px solid #e7e2da;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(44, 58, 40, 0.08);
}

.builder-back-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e7e2da;
  border-radius: 14px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.82);
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}

.builder-back-button:hover {
  color: #2c3a28;
  border-color: rgba(74, 103, 65, 0.28);
  background: #f0f7f0;
}

.builder-eyebrow,
.builder-section-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4a6741;
}

.builder-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.builder-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e7e2da;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.builder-flow-step span {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #4a6741;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.builder-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.builder-save-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.builder-save-status[data-state="dirty"]::before {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}

.builder-action-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.builder-action-bar__row {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.builder-live-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.builder-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.builder-included-note {
  padding: 13px 14px;
  margin-bottom: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 103, 65, 0.22);
  background: linear-gradient(135deg, rgba(240, 247, 240, 0.92), #ffffff 72%);
}

@media (min-width: 1280px) {
  .builder-hero {
    padding: 24px;
  }
}

/* Form builder — field library palette */

#field-palette {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.field-palette-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.field-palette-group-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: #94a3b8;
  margin: 0 0 0 2px;
  flex-shrink: 0;
}

.field-palette-item {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  transition:
    border-color 0.15s,
    background-color 0.15s,
    box-shadow 0.15s,
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-palette-item:active {
  cursor: grabbing;
}

.field-palette-item:hover {
  border-color: #4a6741;
  background: #f0f7f0;
  box-shadow: 0 8px 22px rgba(74, 103, 65, 0.1);
  transform: translateX(2px);
}

.field-palette-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.field-palette-item-row > i.bi {
  font-size: 1.125rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.field-palette-item-title {
  min-width: 0;
}

.field-palette-item-desc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.4;
  padding-left: 2rem;
}

.field-palette-item:focus-visible {
  outline: 2px solid #4a6741;
  outline-offset: 2px;
}

.template-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid #dde7d9;
  background: #ffffff;
  color: #3f5d38;
  cursor: pointer;
  transition: all 0.18s ease;
}
.template-chip:hover {
  border-color: #4a6741;
  color: #2c3a28;
  background: #f0f7f0;
  transform: translateY(-1px);
}
.template-chip:focus-visible {
  outline: 2px solid #4a6741;
  outline-offset: 2px;
}

/* ─── FIELD CARDS (sortable) ────────────────────────────── */

.field-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 14px 12px;
  cursor: default;
  touch-action: auto;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  user-select: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}
.field-card-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.field-card-meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #94a3b8;
}
.field-card-head-main {
  align-items: flex-start;
}
.field-card-title-row {
  row-gap: 2px;
}
.field-card-title-row .field-card-label {
  flex: 1 1 8rem;
  min-width: 0;
}
.field-required-indicator {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  font-size: 11px;
  line-height: 1;
}
.field-required-indicator-asterisk {
  font-weight: 800;
  font-size: 13px;
  transform: translateY(-1px);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.field-card-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8edf3;
}

/* Mini form preview tray */
#form-builder-page .field-card-preview > .field-card-preview-inner {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #ffffff 65%);
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#form-builder-page
  .field-card-preview
  > .field-card-preview-inner.preview-fake-section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 2px;
}

.field-card-preview-inner {
  pointer-events: none;
}
.preview-fake-label.preview-fake-label-row,
.preview-fake-label-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 6px;
}
.preview-fake-label-row.mb-1 {
  margin-bottom: 6px;
}
.preview-label-text {
  color: #475569;
  font-weight: 600;
}
.preview-required-star {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  line-height: 1;
  color: #ea580c;
}
.preview-required-asterisk {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  color: #ea580c;
}
.preview-fake-input,
.preview-fake-textarea,
.preview-fake-select {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #94a3b8;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}
#form-builder-page .preview-fake-input,
#form-builder-page .preview-fake-textarea,
#form-builder-page .preview-fake-select {
  border-width: 1px;
  border-style: solid;
}
.preview-fake-section {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  padding: 4px 0 2px;
  border-bottom: 2px solid #e2e8f0;
}
.preview-fake-signature {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}
.preview-fake-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 11px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.preview-fake-file-head {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  flex: 1 1 8rem;
  min-width: 0;
}
.preview-fake-file-title {
  word-break: break-word;
}
.preview-fake-file-hint {
  flex: 1 1 100%;
  margin-top: 2px;
  font-size: 11px !important;
  font-weight: 500;
  color: #94a3b8 !important;
  line-height: 1.35;
}
.preview-fake-file i {
  color: #4a6741;
  font-size: 16px;
  flex-shrink: 0;
}
.preview-fake-stars {
  display: flex;
  gap: 4px;
  font-size: 15px;
  align-items: center;
  flex-wrap: wrap;
}
.preview-fake-radio-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.preview-fallback-type {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 12px !important;
  color: #64748b !important;
}

.field-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.field-badge-cond {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* Built-in submitter email (form builder + canvas) */
.field-tag-required {
  font-size: 9px;
  font-weight: 800;
  text-transform: lowercase;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  flex-shrink: 0;
}
.preview-builtin-required-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: #0369a1;
  flex-shrink: 0;
  line-height: 1;
}
.prop-panel-tag {
  display: inline-flex;
  align-items: center;
}

.prop-section {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.prop-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.prop-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 10px;
}
.prop-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}
.prop-input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.prop-input:focus {
  outline: none;
  border-color: #4a6741;
  background: #fff;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 2px rgba(74, 103, 65, 0.12);
}

/* Form builder inspector: ensure inputs stay visibly boxed vs Tailwind preflight */
#form-builder-page .prop-input {
  border-width: 1px;
  border-style: solid;
}

#builder-save-status[data-state="dirty"] {
  color: #d97706;
}
.field-card:hover {
  border-color: #c4d4c0;
  box-shadow: 0 10px 28px rgba(44, 58, 40, 0.09);
}
.field-card.selected {
  border-color: #4a6741;
  background: #fbfefb;
  box-shadow:
    0 0 0 2px rgba(74, 103, 65, 0.12),
    0 12px 30px rgba(74, 103, 65, 0.08);
}

/* Drag handle */
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 32px;
  color: #cbd5e1;
  cursor: grab;
  border-radius: 8px;
  transition: all 0.15s;
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  touch-action: none;
}
.drag-handle:hover {
  color: #4a6741;
  background: #f0f7f0;
}
.drag-handle:active {
  cursor: grabbing;
}

/* Icon badge */
.field-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f0f7f0;
  color: #4a6741;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.field-card.selected .field-icon-badge {
  background: #4a6741;
  color: white;
}

/* Action buttons */
.field-actions {
  opacity: 0;
  transition: opacity 0.15s;
}
.field-card:hover .field-actions {
  opacity: 1;
}
.field-card.selected .field-actions {
  opacity: 1;
}

.field-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  color: #9ca3af;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
}
.field-action-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
}
.field-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.field-action-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Ghost card (floating during drag) */
.drag-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.field-card-ghost {
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.18),
    0 0 0 1.5px rgba(74, 103, 65, 0.3);
  border-color: #4a6741 !important;
  background: white;
  border-radius: 12px;
  scale: 1.02;
  opacity: 0.95;
  cursor: grabbing;
  transition:
    box-shadow 0.2s,
    scale 0.2s,
    opacity 0.2s;
}

.field-card-sortable-chosen {
  border-color: #4a6741;
  box-shadow: 0 8px 24px rgba(44, 58, 40, 0.12);
}

.field-card-sortable-ghost {
  opacity: 0.35;
  background: #f0f7f0;
  border: 2px dashed rgba(74, 103, 65, 0.45);
}

.field-card-sortable-fallback,
.field-palette-sortable-fallback {
  box-shadow:
    0 22px 54px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(74, 103, 65, 0.28);
  transform: rotate(0.5deg);
  opacity: 0.96;
  cursor: grabbing;
}

.field-palette-sortable-chosen {
  border-color: #4a6741;
  background: #f0f7f0;
}

.field-palette-sortable-drag {
  width: 220px;
}

/* Drop placeholder */
.drag-placeholder {
  border: 2px dashed rgba(74, 103, 65, 0.35);
  border-radius: 12px;
  background: rgba(74, 103, 65, 0.03);
  transition: height 0.2s cubic-bezier(0.2, 0, 0, 1);
  animation: placeholderPulse 2s ease infinite;
}
@keyframes placeholderPulse {
  0%,
  100% {
    border-color: rgba(74, 103, 65, 0.3);
  }
  50% {
    border-color: rgba(74, 103, 65, 0.6);
  }
}

/* Field enter/exit animations */
.field-card-enter {
  animation: fieldEnter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fieldEnter {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.field-card-exit {
  animation: fieldExit 0.25s ease forwards;
  pointer-events: none;
}
@keyframes fieldExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateX(20px);
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
}

/* Properties panel entrance */
.prop-panel-content {
  animation: propSlideIn 0.2s ease;
}
@keyframes propSlideIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enrichment data card */
.enrichment-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.enrichment-card-header {
  background: linear-gradient(135deg, #4a6741, #4a6741);
  color: white;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.enrichment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.enrichment-badge.pending {
  background: #fef3c7;
  color: #92400e;
}
.enrichment-badge.success {
  background: #d1fae5;
  color: #065f46;
}
.enrichment-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.enrichment-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.enrichment-row:last-child {
  border-bottom: none;
}
.enrichment-label {
  color: #6b7280;
  font-weight: 500;
}
.enrichment-value {
  color: #1f2937;
  text-align: right;
  max-width: 60%;
}

/* Loading spinner */
.loading-spinner {
  animation: spin-reverse 0.7s linear infinite;
}
@keyframes spin-reverse {
  to {
    transform: rotate(360deg);
  }
}

/* ─── EMAIL CHIPS ───────────────────────────────────────── */

.email-chips-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: text;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.email-chips-container:focus-within {
  border-color: #4a6741;
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}

.email-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 10px;
  background: #4a6741;
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  animation: chipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition:
    background 0.15s,
    transform 0.15s;
}
.email-chip:hover {
  background: #2c3a28;
}

.email-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition:
    background 0.15s,
    transform 0.15s;
}
.email-chip-remove:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.15);
}

.email-chip-input {
  flex: 1;
  min-width: 180px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  padding: 4px 2px;
  color: #1f2937;
}
.email-chip-input::placeholder {
  color: #9ca3af;
}

@keyframes chipIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.shake {
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.pulse-highlight {
  animation: pulseHighlight 0.5s ease;
}
@keyframes pulseHighlight {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(74, 103, 65, 0.25);
  }
}

/* ─── TOGGLE SWITCH ─────────────────────────────────────── */

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  transition: background 0.25s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.toggle-switch input:checked + .toggle-slider {
  background: #4a6741;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.2);
}

/* ─── MODAL ANIMATIONS ──────────────────────────────────── */

.modal-backdrop {
  animation: fadeIn 0.2s ease;
}
.modal-content {
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ─── MICRO-INTERACTIONS ────────────────────────────────── */

/* Buttons get a subtle press effect */
button:not(:disabled):active,
a[class*="bg-primary"]:active,
a[class*="bg-accent"]:active {
  transform: scale(0.97);
}

/* Card hover lift */
.field-card .drag-handle:active {
  cursor: grabbing;
}

/* Smooth focus transitions for all inputs */
input,
textarea,
select {
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}

/* Enrichment toggle hover */
#enrichment-toggles label {
  transition: all 0.2s;
}
#enrichment-toggles label:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ─── STAGGERED CARD ENTRANCE ───────────────────────────── */

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── SKELETON LOADING ──────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ─── SMOOTH PAGE TRANSITIONS ───────────────────────────── */

.p-6,
.p-10 {
  animation: pageIn 0.3s ease;
}
@keyframes pageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Sidebar (legacy) */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
}
.sidebar-link:hover {
  background: #f1f5f9;
  color: #334155;
}
.sidebar-link.active {
  background: #f0f7f0;
  color: #4a6741;
}
.sidebar-link.active:hover {
  transform: none;
}

/* Signature pad */
.signature-pad {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: crosshair;
}
.signature-pad:hover {
  border-color: #4a6741;
}

/* Star rating */
.star-rating {
  display: flex;
  gap: 4px;
}
.star-rating .star {
  font-size: 24px;
  cursor: pointer;
  color: #e2e8f0;
  transition: color 0.1s;
}
.star-rating .star.active {
  color: #f59e0b;
}
.star-rating .star:hover {
  color: #f59e0b;
}

/* Integration pills */
.integration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  transition: all 0.15s;
}
.integration-pill:hover {
  border-color: #ff4a00;
  color: #ff4a00;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 74, 0, 0.08);
}
.integration-pill-more {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #ff4a00;
  border: 1px solid #ff4a00;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

/* Integration logo grid (homepage) */
.integration-logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: white;
  border: 1px solid #e5e0d8;
  border-radius: 16px;
  transition: all 0.2s ease;
}
.integration-logo-card:hover {
  border-color: #ff4a00;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 74, 0, 0.08);
}
.integration-logo-card img,
.integration-logo-card svg {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.si-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f8f5ef;
  border: 1px solid #ece6dc;
  transition: all 0.2s ease;
}
.integration-logo-card:hover .si-icon-wrap {
  background: #ffffff;
  border-color: #ffd9c7;
  box-shadow: 0 4px 12px rgba(255, 74, 0, 0.06);
}
.si-icon-wrap img,
.si-icon-wrap svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.integration-logo-card span {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  text-align: center;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.integration-animate {
  opacity: 0;
  animation: floatIn 0.4s ease forwards;
}

/* Success modal animations */
.success-check-circle {
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
.success-check-icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkDraw 0.4s ease 0.4s forwards;
}
@keyframes successPop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ─── ENRICHMENT RESULT TABLES ──────────────────────────── */
/* Suppress Bootstrap's blue row-hover highlight; keep cells selectable */
.enrich-result-table tbody tr:hover {
  background: transparent !important;
}
.enrich-result-table tbody tr:hover td {
  background: transparent !important;
  color: inherit !important;
}
.enrich-result-table td {
  user-select: text;
  cursor: text;
}
/* Restore pointer + hover only on CSV download buttons inside the table */
.enrich-result-table td a[download] {
  cursor: pointer;
}
.enrich-result-table td a[download]:hover {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

/* ─── TRACT MANAGER ─────────────────────────────────────── */

.tract-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.tract-card.active {
  border-color: #4a6741;
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}
.tract-card.ready {
  border-color: #10b981;
}
.tract-card.error {
  border-color: #ef4444;
}

.tract-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  background: #f8fafc;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tract-card-header:hover {
  background: #f1f5f9;
}

.tract-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
}

.tract-header-main {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  flex: 1;
  min-width: 0;
  padding-right: 16px;
}

.tract-name-row {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.tract-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tract-badge-row {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
}

.tract-badge-row > * {
  white-space: nowrap;
}

.tract-header-chevron {
  position: absolute;
  top: 2px;
  right: 0;
}

.tract-summary {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.tract-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tract-status-badge.pending {
  background: #f1f5f9;
  color: #64748b;
}
.tract-status-badge.selecting {
  background: #fef3c7;
  color: #92400e;
}
.tract-status-badge.enriching {
  background: #e8f0e7;
  color: #2c3a28;
}
.tract-status-badge.ready {
  background: #d1fae5;
  color: #065f46;
}
.tract-status-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.tract-body {
  padding: 10px 12px 12px;
  border-top: 1px solid #f1f5f9;
}

.tract-method-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tract-method-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* mobile tap target */
}
.tract-method-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.tract-method-btn.active {
  background: #f0f7f0;
  border-color: #4a6741;
  color: #2c3a28;
}
.tract-method-btn.active i {
  color: #4a6741;
}

.tract-feature-count {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
  min-height: 16px;
}

.tract-actions {
  display: flex;
  gap: 6px;
}

.tract-btn-done {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.tract-btn-done:hover:not(:disabled) {
  background: #059669;
}
.tract-btn-done:active:not(:disabled) {
  transform: scale(0.97);
}
.tract-btn-done:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tract-btn-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.tract-btn-edit:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.tract-btn-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  background: #fff;
  color: #94a3b8;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.tract-btn-delete:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.tract-btn-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, #4a6741, #6b8c61);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  box-shadow: 0 1px 4px rgba(74, 103, 65, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.tract-btn-view:hover {
  background: linear-gradient(135deg, #2c3a28, #4a6741);
  box-shadow: 0 2px 8px rgba(44, 58, 40, 0.35);
}
.tract-btn-view:active {
  transform: scale(0.97);
}

.tract-enrichment-preview {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  font-size: 11.5px;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tract-enrichment-preview i {
  color: #10b981;
  flex-shrink: 0;
}

/* Acres breakdown: xx.xx + xx.xx = xxx.xx */
.tract-acres-breakdown {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  line-height: 1.4;
  word-break: break-all;
}
.tract-acres-parts {
  color: #64748b;
}
.tract-acres-equals {
  color: #94a3b8;
  margin: 0 2px;
}
.tract-acres-sum {
  color: #1e293b;
  font-weight: 700;
}

/* ── Enrichment Modal Map ── */
.enrich-layer-btn {
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #374151;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
  line-height: 1.6;
}
.enrich-layer-btn:hover {
  background: #f0f7f0;
  border-color: #c4d4c0;
  color: #2c3a28;
}
.enrich-layer-btn.active {
  background: #4a6741;
  color: #fff;
  border-color: #4a6741;
  font-weight: 600;
}

.enrich-layer-group-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-right: 2px;
  white-space: nowrap;
}
.enrich-legend-swatch {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  gap: 3px;
}

/* ── Soils table (shared between enrichment modal & soils-map page) ── */
.pf-soils-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: #e5e0d8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0;
}
.pf-soils-summary .s-cell {
  background: #fff;
  padding: 14px 16px;
  text-align: center;
}
.pf-soils-summary .s-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  font-weight: 600;
}
.pf-soils-summary .s-val {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.pf-soils-grid-wrap {
  padding: 0;
}
.pf-soils-grid {
  min-width: 0;
  font-size: 12px;
}
.pf-soils-grid-header,
.pf-soil-row,
.pf-soils-grid-footer {
  display: grid;
  grid-template-columns: 28px 56px minmax(100px, 1fr) 40px 56px 52px 50px 44px;
  column-gap: 6px;
  align-items: center;
}
.pf-soils-grid-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  border-bottom: 2px solid #e5e0d8;
  padding: 7px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
}
.pf-soil-row {
  border-bottom: 1px solid #f0ede8;
  padding: 7px 14px;
  transition: background 0.12s;
}
.pf-soil-row:hover {
  background: #f5f3ee;
}
.pf-soils-grid-footer {
  padding: 8px 14px;
  border-top: 2px solid #e5e0d8;
  font-size: 12px;
  color: #1a1a2e;
}
.pf-soil-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.pf-soil-cell-sw {
  display: flex;
  justify-content: center;
}
.pf-soil-cell-code {
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-soil-cell-desc {
  color: #555;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
.pf-soil-cell-r {
  text-align: right;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ─── MOBILE RESPONSIVE FIXES ──────────────────────────── */

@media (max-width: 639px) {
  /* Dashboard pages need padding below mobile topbar */
  #dashboard-overview,
  #form-builder-page,
  #submissions-page,
  #settings-page,
  #billing-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Submissions map - shorter on mobile */
  #submissions-map {
    min-height: 260px !important;
  }
  #submissions-map-container #submissions-map {
    height: 300px !important;
  }

  /* Form builder: field palette as horizontal scroll on mobile */
  #section-field-palette .builder-section {
    max-height: none;
  }

  /* Make modals full-screen on small phones */
  .modal-content {
    border-radius: 12px;
  }

  /* Pricing cards stack with less gap */
  #section-pricing .grid {
    gap: 1rem;
  }

  /* Public form header - tighter on mobile */
  #public-form-header .max-w-6xl {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Form builder: 3-column grid stacks single-column */
  #form-builder-page > .grid {
    grid-template-columns: 1fr !important;
  }
}

/* Ensure tap targets are at least 44px on touch devices */
@media (pointer: coarse) {
  .field-palette-item {
    min-height: 44px;
  }
  details > summary {
    min-height: 48px;
  }
}

/* Public-form modal variant: keep cells single-line and allow horizontal scrolling */
.pf-soils-grid-wrap--scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.pf-soils-grid-wrap--scroll .pf-soils-grid {
  width: max-content;
  min-width: 100%;
}
.pf-soils-grid-wrap--scroll .pf-soils-grid-header,
.pf-soils-grid-wrap--scroll .pf-soil-row,
.pf-soils-grid-wrap--scroll .pf-soils-grid-footer {
  grid-template-columns: 28px 64px 460px 52px 68px 64px 62px 56px;
}
.pf-soils-grid-wrap--scroll .pf-soils-grid-header > div,
.pf-soils-grid-wrap--scroll .pf-soil-cell-code,
.pf-soils-grid-wrap--scroll .pf-soil-cell-desc,
.pf-soils-grid-wrap--scroll .pf-soil-cell-r {
  white-space: nowrap;
}
.pf-soils-grid-wrap--scroll .pf-soil-cell-code,
.pf-soils-grid-wrap--scroll .pf-soil-cell-desc {
  overflow: visible;
  text-overflow: clip;
  word-break: normal;
}

/* Public-form modal: keep description on one line */
.pf-soils-grid-wrap--desc-nowrap .pf-soil-cell-desc {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  word-break: normal;
}

/* Dashboard form cards: action buttons respond to card width, not viewport */
.form-card {
  container-type: inline-size;
  container-name: form-card;
  display: flex;
  flex-flow: column nowrap;
}

.form-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
  margin-top: auto;
}

@container form-card (min-width: 430px) {
  .form-card-actions--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .form-card-actions--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.form-card-actions > a,
.form-card-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
