﻿.project-form-shell {
  min-height: 100vh;
  padding: 42px clamp(20px, 5vw, 72px);
  background: #f5f7f9;
}

.project-form-header {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.project-form-header p {
  margin: 0 0 6px;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
}

.project-form-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
}

.project-form-link {
  display: inline-flex;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
  align-items: center;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  color: var(--color-primary);
  background: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.project-form-link svg {
  width: 1em;
  height: 1em;
}

.project-form-map-link {
  border-color: transparent;
  color: var(--color-primary);
  background: transparent;
  transition: color 180ms ease, background-color 180ms ease;
}

.project-form-map-link:hover,
.project-form-map-link:focus {
  color: #0b6faa;
  background: #0e7dc40f;
  outline: none;
}

.project-form-notice {
  margin-bottom: 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 42, 56, 0.08);
}

.project-form-notice p {
  margin: 0;
}

.project-form-notice p + p {
  margin-top: 6px;
}

body.is-access-gated .project-form-notice {
  display: none;
}

body.is-editing-project .project-form-notice {
  display: none;
}

.project-form-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  gap: 24px;
  align-items: start;
}

.project-form-workspace.is-submitted > .project-form-card,
.project-form-workspace.is-submitted > .preview-panel {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.project-form-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(30, 42, 56, 0.1);
}

.access-gate-card {
  grid-column: 1 / -1;
  width: min(100%, 520px);
  justify-self: center;
}

.edit-project-card {
  grid-column: 1 / -1;
  width: min(100%, 760px);
  justify-self: center;
}

.project-form-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

.project-form-card-header h2 {
  margin: 0;
  font-size: 1.12rem;
}

.project-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.project-form-section {
  display: grid;
  gap: 12px;
}

.project-form-section h3 {
  margin: 0;
  color: #33383d;
  font-size: 1rem;
  font-weight: 600;
}

.required-mark {
  color: #b42318;
  font-weight: 700;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field:has(select[name="carrierEstablishmentId"]) {
  grid-column: 1 / -1;
}

.project-type-choices {
  display: grid;
  gap: 8px;
}

.project-type-choice {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  align-items: flex-start;
  border: 1px solid #d5dbe1;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.project-type-choice:has(input:checked) {
  border-color: var(--color-primary);
  background: #eef7fc;
}

.project-type-choice:hover,
.project-type-choice:focus-within {
  border-color: var(--color-primary);
}

.project-type-choice input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
  flex: 0 0 auto;
}

.project-type-choice span {
  display: grid;
  gap: 2px;
}

.project-type-choice strong {
  color: #33383d;
  font-weight: 400;
}

.project-type-choice small {
  color: var(--color-muted);
  line-height: 1.35;
}

.form-field > span:not(.visually-hidden),
.choice-label {
  color: #33383d;
  font-weight: 600;
}

.field-help {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.character-count {
  justify-self: end;
}

.field-error {
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-line;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d5dbe1;
  border-radius: 4px;
  background: #ffffff;
}

.password-field {
  position: relative;
  display: block;
  font-weight: 400;
}

.password-field input {
  padding-right: 44px;
  font-weight: 400;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  color: var(--color-muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--color-primary);
  background: #eef7fc;
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.combobox {
  position: relative;
}

.combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #d5dbe1;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(30, 42, 56, 0.16);
}

.combobox-list[hidden] {
  display: none;
}

.combobox-option {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  color: var(--color-text);
  background: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.combobox-option:last-child {
  border-bottom: 0;
}

.combobox-option:hover,
.combobox-option:focus {
  background: #eef7fc;
  outline: none;
}

.combobox-option strong {
  color: #33383d;
  font-weight: 600;
}

.combobox-option small,
.combobox-empty {
  color: var(--color-muted);
  font-size: 0.86rem;
}

.combobox-empty {
  padding: 10px;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice-list {
  display: grid;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d5dbe1;
  border-radius: 4px;
}

.choice-search {
  margin-bottom: 8px;
}

.selected-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.selected-choice-chip {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid #c9d7e3;
  border-radius: 999px;
  color: #24465d;
  background: #eef7fc;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.selected-choice-chip:hover,
.selected-choice-chip:focus-visible {
  border-color: #f0b8b2;
  color: #cd3e34;
  background: #fff8f7;
}

.selected-choice-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-choice-chip svg {
  width: 0.95em;
  height: 0.95em;
  flex: 0 0 auto;
}

.choice-item input[type="checkbox"] {
  width: auto;
  min-height: 0;
  flex: 0 0 auto;
  margin-top: 3px;
}

.choice-empty {
  margin: 0;
  padding: 10px;
  color: var(--color-muted);
}

.form-help {
  margin: 0;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--color-muted);
  background: var(--color-soft);
}

.choice-item {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  align-items: flex-start;
  border-bottom: 1px solid #edf0f3;
}

.choice-item:last-child {
  border-bottom: 0;
}

.choice-item span {
  color: var(--color-muted);
  font-size: 0.88rem;
}

.project-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.project-form-consent {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #f8fafc;
}

.consent-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #33383d;
  font-size: 0.92rem;
  line-height: 1.45;
}

.consent-field input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
  flex: 0 0 auto;
}

.inline-info-button {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--color-primary);
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.consent-info-button {
  width: fit-content;
  font-size: 0.9rem;
}

.project-form-info-modal {
  display: grid;
  width: min(100%, 560px);
  max-height: min(90vh, 620px);
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(30, 42, 56, 0.22);
}

.project-form-info-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}

.project-form-info-header h2 {
  margin: 0;
  color: #33383d;
  font-size: 1.2rem;
}

.project-form-info-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  background: #ffffff;
  cursor: pointer;
}

.project-form-info-content {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.project-form-info-content p {
  margin: 0;
  color: #33383d;
  line-height: 1.55;
}

.submission-message {
  flex: 1 1 auto;
  margin: 0;
  font-weight: 700;
}

.submission-message.success {
  color: #187048;
}

.submission-message.error {
  color: #b42318;
}

.project-form-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  background: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.project-form-button:hover,
.project-form-button:focus {
  background: #0b6faa;
  outline: none;
}

.project-form-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.project-form-button.secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: #ffffff;
}

.project-form-button.secondary:hover,
.project-form-button.secondary:focus {
  border-color: #d6dce2;
  color: var(--color-text);
  background: #f5f7f9;
  outline: none;
}

.project-form-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 247, 249, 0.72);
  backdrop-filter: blur(2px);
}

.project-form-success-modal {
  display: grid;
  width: min(100%, 460px);
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(30, 42, 56, 0.22);
  text-align: center;
}

.project-form-success-modal h2,
.project-form-success-modal p {
  margin: 0;
}

.success-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #187048;
}

.success-icon svg {
  width: 24px;
  height: 24px;
}

.success-reference-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 6px;
  background: var(--color-soft);
  text-align: left;
}

.success-reference-list p {
  display: grid;
  gap: 2px;
}

.success-reference-list strong {
  color: var(--color-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.success-reference-list span {
  color: #33383d;
  font-weight: 700;
}

.success-warning {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.success-warning.is-important {
  color: #9f1c1c;
  font-style: italic;
  font-weight: 600;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.success-actions .project-form-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.preview-panel {
  position: sticky;
  top: 24px;
}

.preview-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.preview-project-card {
  padding: 18px;
}

.preview-establishment-group {
  gap: 10px;
}

@media (max-width: 980px) {
  .project-form-workspace,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }
}

