/* Module stylesheet: projects (P01 Overview). Owned by the projects module; base styles live in public/style.css. */

/* Next step card: copper-wash header with the primary action, then blockers and optional items. */
.ov-next-head {
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  background: var(--accent-wash);
  border-bottom: 1px solid #f0e2d7;
}
.ov-next-text {
  min-width: 0;
  flex: 1 1 280px;
}
.ov-next-head h2 {
  font-size: 1.33rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 4px 0 0;
}
.ov-next-head p {
  margin: 5px 0 0;
  font-size: 0.93rem;
  color: var(--text-3);
  text-wrap: pretty;
}
.ov-next-section {
  padding: 14px 20px 4px;
}
.ov-next-section:last-child {
  padding-bottom: 16px;
}
.ov-next-section h3 {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text-2);
}
.ov-next-section .blocker-list li {
  color: var(--text-2);
}
.ov-optional-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.ov-optional-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 9px 0;
  border-top: 1px solid var(--divider);
}
.ov-optional-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.93rem;
  color: var(--text-2);
}
.ov-optional-label::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px dashed #b9b4ab;
}
.ov-action,
.ov-head-link {
  font-size: 0.9rem;
  text-underline-offset: 3px;
}

/* Project details */
.ov-strong-link {
  font-weight: 600;
}
.ov-edit {
  padding: 18px 20px 20px;
  gap: 14px;
}
.ov-edit .form-actions {
  margin-top: 0;
  padding-top: 4px;
}
.ov-city-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.ov-city-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

/* Contacts: link panel (segmented source switch, searchable people list, new-contact form) and rows. */
.ov-link {
  margin: 16px 20px 4px;
  padding: 16px;
  gap: 14px;
}
.ov-link-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ov-link .banner {
  margin: 0;
}
.ov-pick {
  border: 1px solid var(--input-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.ov-pick.invalid {
  border-color: var(--danger);
}
.ov-pick-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.ov-pick-search input[type="search"] {
  min-height: 38px;
  font-size: 0.97rem;
  border-radius: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.ov-pick-search button {
  min-height: 38px;
}
.ov-pick-list {
  max-height: 230px;
  overflow-y: auto;
  padding: 4px;
}
.ov-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ov-pick-row:hover,
.ov-pick-row:has(input:checked) {
  background: var(--surface-sunken);
}
.ov-pick-row input {
  flex-shrink: 0;
}
.ov-pick-text {
  flex: 1;
  min-width: 0;
}
.ov-pick-name {
  display: block;
  font-size: 0.97rem;
  font-weight: 600;
}
.ov-pick-sub {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.ov-tag {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-sunken);
  color: var(--text-3);
  white-space: nowrap;
}
.ov-pick-empty {
  margin: 0;
  padding: 12px 10px;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.ov-link > .field-error {
  margin: -6px 0 0;
}
.ov-link-new {
  gap: 12px;
}
.ov-link-new .hint {
  margin: 0;
}
.ov-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 14px;
}
.ov-new-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.ov-link-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.ov-role {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 220px;
  max-width: 300px;
}
.ov-role > span:first-child {
  font-size: 0.9rem;
}
.ov-role select {
  min-height: 40px;
  font-size: 0.97rem;
}
.ov-contacts {
  padding: 4px 20px 8px;
}
.ov-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ov-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.ov-contact:last-child {
  border-bottom: none;
}
.ov-contact-main {
  flex: 1 1 260px;
  min-width: 0;
}
.ov-contact-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 1rem;
}
.ov-contact-name strong {
  font-weight: 600;
}
.ov-contact-sub {
  margin-top: 2px;
  font-size: 0.87rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.ov-contact .link-button {
  font-size: 0.87rem;
}

/* People */
.ov-people {
  padding: 4px 20px 10px;
}
.ov-owner {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.ov-owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ov-owner-text {
  min-width: 0;
}
.ov-owner-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ov-owner-name {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 600;
}
.ov-owner-name.is-empty {
  font-weight: 400;
}
.ov-owner-editor {
  margin-top: 10px;
}
.ov-owner-editor select {
  min-height: 40px;
  font-size: 0.97rem;
  border-radius: 8px;
}
.ov-owner-editor .form-actions,
.ov-status-editor .form-actions {
  margin-top: 0;
}
.ov-people-note {
  margin: 0;
  padding: 10px 0 2px;
}

/* Scope */
.ov-flat {
  margin: 0;
  font-size: 0.93rem;
}

/* Status */
.ov-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.ov-status-reason {
  font-size: 0.9rem;
  color: var(--text-3);
}
.ov-lc-options {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.ov-lc-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
}
.ov-lc-option:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface);
}
.ov-lc-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ov-lc-option > span:first-child {
  font-size: inherit;
}
.ov-lc-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-faint);
}
.ov-lc-dot.ok {
  background: var(--success);
}
.ov-lc-dot.warn {
  background: var(--warning);
}
.ov-lc-dot.bad {
  background: var(--danger);
}
.ov-lc-reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ov-lc-reason > span:first-child {
  font-size: 0.9rem;
}
.ov-lc-reason input {
  min-height: 40px;
  font-size: 0.97rem;
  border-radius: 8px;
}
/* The reason is only asked for when the project leaves Active (the server enforces it too). */
.ov-status-editor:has(input[name="lifecycle"][value="active"]:checked) .ov-lc-reason {
  display: none;
}
.ov-status-editor .hint {
  margin: 0;
}

@media (max-width: 600px) {
  .ov-city-grid {
    grid-template-columns: 1fr;
  }
  .ov-link {
    margin: 12px 12px 4px;
    padding: 12px;
  }
  .ov-role {
    max-width: none;
  }
}
