/* Purchase information and progress share the existing fixed workspace dialog. */
.purchase-detail-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.purchase-summary {
  min-width: 0;
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule, #dce6e2);
}

.purchase-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.purchase-summary-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.purchase-eyebrow {
  margin-bottom: 8px;
  color: #667f6e;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.purchase-summary .purchase-name {
  margin: 0;
  color: #254232;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.025em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.purchase-stage-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.purchase-stage-line .badge {
  max-width: 100%;
  white-space: normal;
}

.icon-btn.purchase-pencil {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid #dcebe1;
  border-radius: 11px;
  background: #f0f7f3;
  color: #008967;
}

.icon-btn.purchase-pencil:hover {
  border-color: #aed1bd;
  background: #e8f4ed;
}

.purchase-pencil:focus-visible,
.purchase-fact-link:focus-visible {
  outline: 2px solid #008967;
  outline-offset: 3px;
}

.purchase-facts-section {
  min-width: 0;
  margin: 0 0 24px;
}

.purchase-facts-section + .purchase-facts-section {
  padding-top: 22px;
  border-top: 1px solid #e3ebe6;
}

.purchase-facts-section > h3 {
  margin: 0 0 17px;
  color: #36523f;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.purchase-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
  min-width: 0;
  margin: 0;
}

.purchase-fact {
  min-width: 0;
}

.purchase-fact--wide {
  grid-column: 1 / -1;
}

.purchase-fact > dt {
  margin: 0;
  color: #667c6d;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.purchase-fact > dd {
  min-width: 0;
  margin: 5px 0 0;
  color: #304c3a;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.purchase-fact .person,
.purchase-fact .person > span:not(.avatar) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.purchase-fact .person {
  align-items: flex-start;
  line-height: 1.55;
}

.purchase-fact-note {
  display: block;
  margin-top: 4px;
  color: #687d6f;
  font-size: 12px;
  line-height: 1.5;
}

.purchase-fact-link {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #007d5b;
  font: inherit;
  font-weight: 600;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.purchase-fact-link:hover {
  color: #005e44;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.purchase-facts .purchase-amount {
  display: block;
  color: #254b35;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
}

.purchase-checklist {
  min-width: 0;
  margin-top: 8px;
}

.purchase-checklist-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.purchase-checklist-heading > div {
  min-width: 0;
}

.purchase-checklist-heading h3 {
  margin: 0;
  color: #2e4c39;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
}

.purchase-checklist-heading p {
  margin: 5px 0 0;
  color: #667d6d;
  font-size: 13px;
  line-height: 1.5;
}

.purchase-checklist-count {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #edf7f0;
  color: #007c59;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.purchase-checklist .checklist-progress {
  width: calc(100% - 44px);
  margin: 0 22px 18px;
}

.purchase-checklist-error {
  margin: 0 22px 16px;
  padding: 11px 12px;
  border: 1px solid #edc9c9;
  border-radius: 8px;
  background: #fff5f4;
  color: #9d3939;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.purchase-checklist-error[hidden] {
  display: none;
}

.purchase-checklist-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.purchase-checklist-group {
  min-width: 0;
  border-top: 1px solid #e2eae5;
}

.purchase-checklist-group + .purchase-checklist-group {
  border-left: 1px solid #e2eae5;
}

.purchase-checklist-group > h4 {
  margin: 0;
  padding: 12px 18px;
  background: #f6faf7;
  color: #4d6a57;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.purchase-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 54px;
  margin: 0;
  padding: 13px 18px;
  border-top: 1px solid #e9efeb;
  background: #fff;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.purchase-checklist-item > span {
  min-width: 0;
  color: #35523e;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.purchase-checklist-item:hover,
.purchase-checklist-item:focus-within {
  background: #f6faf7;
}

.purchase-checklist-item.is-done {
  background: #eff8f3;
}

.purchase-checklist-item.is-done > span {
  color: #577862;
}

.purchase-checklist-item input[type="checkbox"] {
  appearance: none;
  display: block;
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 1px 0 0;
  padding: 0;
  border: 1.5px solid #acbfb2;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}

.purchase-checklist-item input[type="checkbox"]:checked {
  border-color: #008967;
  background: #008967 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3.2 3.2L15 6.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}

.purchase-checklist-item input[type="checkbox"]:focus-visible {
  outline: 2px solid #008967;
  outline-offset: 3px;
}

.purchase-checklist-item input[type="checkbox"]:disabled {
  opacity: .6;
  cursor: progress;
}

.purchase-checklist-item:has(input:disabled) {
  cursor: progress;
}

.purchase-save-state {
  display: block;
  min-height: 40px;
  margin: 0;
  padding: 10px 22px;
  border-top: 1px solid #e3ebe6;
  background: #fafcfb;
  color: #687e6f;
  font-size: 12px;
  line-height: 1.5;
}

.registry-table--purchases .purchase-registry-amount {
  display: block;
  margin-top: 5px;
  color: #3b5d45;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 801px) {
  .registry-table--purchases .registry-col-secondary {
    width: 170px;
  }

  .registry-table--purchases .purchase-registry-amount {
    max-width: none;
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

@media (max-width: 800px) {
  .registry-table--purchases .purchase-registry-amount {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  .purchase-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 24px;
  }

  .purchase-checklist-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-checklist-group:nth-child(odd) {
    border-left: 0;
  }

  .purchase-checklist-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .purchase-checklist-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-checklist-group + .purchase-checklist-group {
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .purchase-summary {
    margin-bottom: 20px;
    padding-bottom: 18px;
  }

  .purchase-summary-heading {
    gap: 12px;
  }

  .purchase-summary .purchase-name {
    font-size: 20px;
    line-height: 1.45;
  }

  .purchase-eyebrow {
    font-size: 10px;
  }

  .icon-btn.purchase-pencil {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .purchase-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .purchase-facts-section {
    margin-bottom: 21px;
  }

  .purchase-facts-section + .purchase-facts-section {
    padding-top: 19px;
  }

  .purchase-facts-section > h3 {
    margin-bottom: 15px;
    font-size: 15px;
  }

  .purchase-facts .purchase-amount {
    font-size: 21px;
  }

  .purchase-checklist-heading {
    flex-wrap: wrap;
    gap: 10px;
    padding: 17px 14px 13px;
  }

  .purchase-checklist-heading h3 {
    font-size: 17px;
  }

  .purchase-checklist-heading p {
    font-size: 12px;
  }

  .purchase-checklist .checklist-progress {
    width: calc(100% - 28px);
    margin: 0 14px 15px;
  }

  .purchase-checklist-group > h4 {
    padding: 12px 14px;
  }

  .purchase-checklist-item {
    padding: 14px;
  }

  .purchase-checklist-item > span {
    font-size: 13px;
    line-height: 1.6;
  }

  .purchase-checklist-error {
    margin: 0 14px 14px;
  }

  .purchase-save-state {
    padding: 10px 14px;
    font-size: 11px;
  }
}

.purchase-detail-layout,
.purchase-detail-info {
  min-width: 0;
}

@media (min-width: 1100px) {
  .purchase-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
    align-items: start;
    gap: 24px;
  }

  .purchase-detail-info .purchase-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
  }

  .purchase-detail-layout > .purchase-checklist {
    align-self: start;
    margin-top: 0;
  }

  .purchase-detail-layout .purchase-checklist-heading {
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 16px 13px;
  }

  .purchase-detail-layout .purchase-checklist-heading h3 {
    font-size: 17px;
  }

  .purchase-detail-layout .purchase-checklist-heading p {
    font-size: 12px;
  }

  .purchase-detail-layout .purchase-checklist .checklist-progress {
    width: calc(100% - 32px);
    margin: 0 16px 14px;
  }

  .purchase-detail-layout .purchase-checklist-error {
    margin: 0 16px 14px;
  }

  .purchase-detail-layout .purchase-checklist-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .purchase-detail-layout .purchase-checklist-group + .purchase-checklist-group {
    border-left: 0;
  }

  .purchase-detail-layout .purchase-checklist-group > h4 {
    padding: 10px 14px;
    font-size: 12px;
  }

  .purchase-detail-layout .purchase-checklist-item {
    min-height: 46px;
    padding: 11px 14px;
  }

  .purchase-detail-layout .purchase-checklist-item > span {
    font-size: 13px;
    line-height: 1.55;
  }

  .purchase-detail-layout .purchase-save-state {
    padding: 10px 14px;
    font-size: 11px;
  }
}

@media (min-width: 1500px) {
  .purchase-detail-info .purchase-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .purchase-checklist-item {
    transition: none;
  }
}
