@charset "UTF-8";

body {
  font-family: Arial, sans-serif;
  background: #f7f9fc;
  margin: 20px;
  color: #1f2937;
}
.container {
  max-width: 90%;
  margin: auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.header img {
  height: 50px;
}
.header-text h1 {
  margin: 0;
  font-size: 1.4rem;
}
.header-text h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
  color: #555;
}

/* Cards */
.card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.card-result {
  background: #fff;
  border-left: 4px solid transparent;
  border-radius: 4px;
  font-size: small;
}
div#guidance-section {
  font-size: small;
}
.card-summary {
  background: #e0f2fe;
  border-left: 4px solid #0ea5e9;
}
.card-details {
  background: #f3f4f6;
  border-left: 4px solid #6b7280;
}

/* Form rows */
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  gap: 10px;
}
.form-row label {
  flex: 0 0 200px;
  min-width: 200px;
  font-weight: bold;
}
.form-row input[type="text"],
.form-row input[type="date"],
.form-row select,
.form-row input[type="checkbox"]  {
  flex: 1 1 75%;
  min-width: 250px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  gap: 20px;
}

textarea {
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 6px;
  font-family: inherit;
  gap: 20px;
  overflow: hidden;
}

button {
  margin-top: 12px;
  padding: 8px 14px;
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}
button:hover {
  background: #0284c7;
}

.shortcut-hint {
  margin-top: 6px;
  color: #555;
  font-size: 0.85rem;
  text-align: right;
}

/* Risk colours */
.low {
  border-color: #16a34a;
  background: #f0fdf4;
}
.med {
  border-color: #f59e0b;
  background: #fffbeb;
}
.high {
  border-color: #dc2626;
  background: #fef2f2;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: bold;
  color: #fff;
  margin-right: 6px;
  font-size: 0.8rem;
}
.badge.low {
  background: #16a34a;
}
.badge.med {
  background: #f59e0b;
}
.badge.high {
  background: #dc2626;
}

table#riskTable th {
  font-size: small;
}

div#guidance-sectio, table#riskTable textarea {
  font-size: smaller;
}

/* Print styling */
@media print {
  @page {
    transform: scale(0.8);
    size: A4 landscape;
  }

  div#guidance-section {
    font-size: x-small;
    display: block !important;
  }

  .card {
    font-size: small;
  }

  .page-break {
    page-break-before: always;
  }

  .avoid-page-break {
    page-break-inside: avoid;
  }

  div.card.card-input,
  button,
  .shortcut-hint, hr, div#footer {
    display: none !important;
  }

  div#risk-assessment-section .form-row {
    display: flex !important;
  }

  body {
    background: #fff;
  }

  .card-result.low {
    border-color: #16a34a;
    background: none;
  }
  .card-result.med {
    border-color: #f59e0b;
    background: none;
  }
  .card-result.high {
    border-color: #dc2626;
    background: none;
  }

  .badge.low {
    border: 2px solid #16a34a;
    color: #16a34a !important;
    background: none !important;
  }
  .badge.med {
    border: 2px solid #f59e0b;
    color: #f59e0b !important;
    background: none !important;
  }
  .badge.high {
    border: 2px solid #dc2626;
    color: #dc2626 !important;
    background: none !important;
  }
}

.readonly {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  color: #333;
}
