/*
 * Screen document styles. Also copied to public/css/contract-document.css.
 * Print rules stay in @media print only and must not weaken screen rules.
 */

html body .contract-stage {
  background: var(--color-nordic-ivory, #f7f4ee);
  box-sizing: border-box;
  padding: 24px 16px 48px;
}

html body .contract-stage .contract-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 0 auto 24px;
  max-width: 42rem;
  width: 100%;
}

html body .contract-stage .contract-toolbar a,
html body .contract-stage .contract-toolbar button {
  background: transparent;
  border: 0;
  color: var(--color-swedish-lake-ui, #496b7a);
  cursor: pointer;
  font-family: var(--font-sans), Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

html body .contract-stage article.contract-document,
html body .contract-stage .contract-draft {
  background: #fffdf8;
  border: 1px solid var(--color-linen-sand, #e9e1d5);
  border-radius: 2px;
  box-shadow: 0 12px 40px color-mix(in srgb, var(--color-deep-lake, #2d4652) 8%, transparent);
  box-sizing: border-box;
  color: var(--color-deep-lake, #2d4652);
  font-family: var(--font-sans), Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 42rem;
  padding: 32px 24px;
  width: 100%;
}

html body .contract-stage article.contract-document .contract-header {
  border-bottom: 1px solid var(--color-linen-sand, #e9e1d5);
  margin-bottom: 32px;
  padding-bottom: 24px;
}

html body .contract-stage article.contract-document h1 {
  color: var(--color-deep-lake, #2d4652);
  font-family: var(--font-serif), "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: none;
}

html body .contract-stage article.contract-document .contract-meta,
html body .contract-stage article.contract-document .contract-status {
  color: var(--color-deep-lake, #2d4652);
  font-family: var(--font-sans), Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  margin: 0;
}

html body .contract-stage article.contract-document .contract-meta + .contract-meta,
html body .contract-stage article.contract-document .contract-status {
  margin-top: 4px;
}

html body .contract-stage article.contract-document .contract-subtitle {
  font-family: var(--font-serif), "Cormorant Garamond", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 500;
  margin: 16px 0 0;
}

html body .contract-stage article.contract-document .contract-section {
  margin-top: 40px;
}

html body .contract-stage article.contract-document h2 {
  color: var(--color-deep-lake, #2d4652);
  font-family: var(--font-serif), "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 16px;
  text-transform: none;
}

html body .contract-stage article.contract-document h3 {
  font-family: var(--font-sans), Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

html body .contract-stage article.contract-document p {
  margin: 0 0 12px;
}

html body .contract-stage article.contract-document .contract-parties,
html body .contract-stage article.contract-document .contract-stay,
html body .contract-stage article.contract-document .contract-sign {
  display: grid;
  gap: 16px;
}

html body .contract-stage article.contract-document .contract-party,
html body .contract-stage article.contract-document .contract-stay-block {
  background: color-mix(in srgb, var(--color-nordic-ivory, #f7f4ee) 78%, #fff);
  border: 1px solid var(--color-linen-sand, #e9e1d5);
  box-sizing: border-box;
  min-width: 0;
  padding: 16px 18px;
}

html body .contract-stage article.contract-document .contract-party p,
html body .contract-stage article.contract-document .contract-stay-block p {
  margin-bottom: 0;
}

html body .contract-stage article.contract-document .contract-facts,
html body .contract-stage article.contract-document .contract-price-table,
html body .contract-stage article.contract-document .contract-bank-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

html body .contract-stage article.contract-document .contract-facts > div,
html body .contract-stage article.contract-document .contract-price-row,
html body .contract-stage article.contract-document .contract-bank-list > div {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

html body .contract-stage article.contract-document .contract-facts dt,
html body .contract-stage article.contract-document .contract-price-row dt,
html body .contract-stage article.contract-document .contract-bank-list dt {
  font-weight: 400;
}

html body .contract-stage article.contract-document .contract-facts dd,
html body .contract-stage article.contract-document .contract-price-row dd,
html body .contract-stage article.contract-document .contract-bank-list dd {
  font-variant-numeric: tabular-nums;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

html body .contract-stage article.contract-document .contract-price-table {
  border-top: 1px solid var(--color-linen-sand, #e9e1d5);
  padding-top: 12px;
}

html body .contract-stage article.contract-document .contract-price-total {
  border-top: 1px solid var(--color-deep-lake, #2d4652);
  font-weight: 600;
  margin-top: 8px;
  padding-top: 12px;
}

html body .contract-stage article.contract-document .contract-price-total dt,
html body .contract-stage article.contract-document .contract-price-total dd {
  font-weight: 600;
}

html body .contract-stage article.contract-document .contract-price-deposit {
  border-top: 1px solid var(--color-linen-sand, #e9e1d5);
  margin-top: 24px;
  padding-top: 16px;
}

html body .contract-stage article.contract-document .contract-bank {
  background: color-mix(in srgb, var(--color-nordic-ivory, #f7f4ee) 78%, #fff);
  border: 1px solid var(--color-linen-sand, #e9e1d5);
  margin-top: 16px;
  padding: 16px 18px;
}

html body .contract-stage article.contract-document .contract-sign-line {
  border-bottom: 1px solid var(--color-deep-lake, #2d4652);
  margin-bottom: 8px !important;
  min-height: 2.5rem;
}

html body .contract-stage article.contract-document .contract-keep {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media (min-width: 768px) {
  html body .contract-stage {
    padding: 32px 24px 64px;
  }

  html body .contract-stage article.contract-document {
    padding: 48px 40px;
  }

  html body .contract-stage article.contract-document h1 {
    font-size: 2.25rem;
  }

  html body .contract-stage article.contract-document .contract-parties,
  html body .contract-stage article.contract-document .contract-stay,
  html body .contract-stage article.contract-document .contract-sign {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  html body .contract-stage {
    overflow-x: hidden;
  }
}

@media print {
  .print-hide,
  .print-hide {
    display: none !important;
  }

  html body .contract-stage {
    background: #fff;
    padding: 0;
  }

  html body .contract-stage article.contract-document {
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #111;
    max-width: none;
    padding: 0;
  }

  html body .contract-stage article.contract-document h2,
  html body .contract-stage article.contract-document .contract-keep,
  html body .contract-stage article.contract-document .contract-prices,
  html body .contract-stage article.contract-document .contract-bank,
  html body .contract-stage article.contract-document .contract-sign {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  html body .contract-stage article.contract-document h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .guest-document h2,
  .guest-document h3,
  .guest-document p,
  .guest-document li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  @page {
    size: A4;
    margin: 16mm;
  }
}
