.complaint-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1.5rem;
  background-color: #f9f9f9;
  max-width: 800px;
  margin: 10rem auto;
  font-family: "Segoe UI", sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  text-align: center;
}

.card-content dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 1rem;
  column-gap: 1rem;
}

.field-row {
  display: contents;
}

.field-row dt {
  font-weight: 600;
  color: #34495e;
  align-self: start;
}

.field-row dd {
  margin: 0;
  color: #2c3e50;
  background-color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  word-break: break-word;
}

.missing {
  color: #999;
  font-style: italic;
}

/* Mobile responsiveness */
@media screen and (max-width: 600px) {
  .card-content dl {
    grid-template-columns: 1fr;
  }

  .field-row dt {
    margin-bottom: 0.25rem;
  }
}

/* Print-specific styles for confirmation view */
@media print {

  /* Hide everything by default */
  body * {
    visibility: hidden;
  }

  /* Show only the complaint-card and its children */
  .complaint-card,
  .complaint-card * {
    visibility: visible;
  }

  /* Center complaint-card horizontally on print page */
  .complaint-card {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    max-width: 800px;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
  }

  /* Remove any box shadows or borders that may not print well */
  .complaint-card {
    box-shadow: none !important;
    border: none !important;
  }

  /* Ensure good print quality for text */
  .complaint-card {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Prevent page breaks inside important elements */
  .complaint-card h1,
  .complaint-card h2,
  .complaint-card h3,
  .complaint-card p,
  .complaint-card div {
    page-break-inside: avoid;
  }

  /* Remove any navigation, headers, footers */
  header,
  nav,
  footer,
  .navbar,
  .nav,
  .menu,
  .sidebar,
  .breadcrumb,
  button,
  .btn {
    display: none !important;
  }

  /* Optimize link appearance for print */
  .complaint-card a {
    text-decoration: none;
    color: #000;
  }

  /* Show link URLs after the link text if desired */
  .complaint-card a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  /* Remove the URL display for anchor links and javascript links */
  .complaint-card a[href^="#"]:after,
  .complaint-card a[href^="javascript"]:after {
    content: "";
  }

  .field-row dd {
    border: none !important;
  }

  /* Set proper margins for print */
  @page {
    margin: 0.5in;
    size: auto;
  }
}