/* Duty form fields and single-page A4 Keyman/Night Patrolling output. */
#legacy-containers[data-duty-type="night"] .duty-search-input,
#legacy-containers[data-duty-type="night"] .duty-mobile-input,
#legacy-containers[data-duty-type="night"] .duty-gps-input,
#legacy-containers[data-duty-type="keyman"] .duty-search-input,
#legacy-containers[data-duty-type="keyman"] .duty-mobile-input,
#legacy-containers[data-duty-type="keyman"] .duty-gps-input {
  color: #6b7280 !important;
  -webkit-text-fill-color: #6b7280 !important;
}

#legacy-containers[data-duty-type="night"] .duty-mobile-input,
#legacy-containers[data-duty-type="keyman"] .duty-mobile-input {
  font-weight: 400 !important;
}

.duty-subtitle-input {
  max-width: 360px;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
}

.duty-subtitle-input::placeholder {
  color: #cbd5e1 !important;
  font-size: 0.85em;
  opacity: 1;
}

#pdf-content {
  position: relative;
  box-sizing: border-box;
  --duty-title-font-size: 15pt;
  padding: 16mm 12mm 18mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  overflow: hidden;
}

.duty-pdf-watermark {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 5mm;
  transform: translateX(-50%);
  color: #9ca3af;
  font-size: 8pt;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

#pdf-content .patrol-title .duty-pdf-subtitle-cell {
  background: transparent !important;
  color: #334155 !important;
  font-family: "Times New Roman", Times, serif !important;
  font-size: calc(var(--duty-title-font-size) - 2px) !important;
  display: block;
  font-style: italic;
  font-weight: 700 !important;
  line-height: 1.2;
  overflow-wrap: anywhere;
  padding: 2px 0 0 !important;
  text-align: center;
  white-space: normal;
}

#pdf-content,
#pdf-content * {
  font-family: "Times New Roman", Times, serif !important;
}

#pdf-content #dynamic-pdf-table .th-bit,
#pdf-content #dynamic-pdf-table .th-range {
  font-size: 12pt !important;
}

#pdf-content #dynamic-pdf-table .td-bit,
#pdf-content #dynamic-pdf-table .td-range {
  font-size: 10pt !important;
}

#pdf-content #dynamic-pdf-table thead th {
  font-size: 12pt !important;
}

#pdf-content #dynamic-pdf-table thead th:nth-child(3) {
  font-size: 14pt !important;
}

#pdf-content #dynamic-pdf-table tbody td:nth-child(3) {
  font-size: 12pt !important;
}

#sidebar button {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

#sidebar button:hover,
#sidebar button:focus-visible {
  background: rgba(255, 255, 255, 0.1) !important;
}

#preview-section {
  padding-bottom: 92px !important;
}

.duty-preview-bottom-actions {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  box-sizing: border-box;
  width: min(520px, 100vw);
  padding: 7px 12px max(7px, env(safe-area-inset-bottom));
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
}

.duty-preview-bottom-actions .preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  padding: 0 9px;
  font-size: 12px;
}

.duty-preview-bottom-actions .preview-btn .ui-icon {
  font-size: 15px;
}

.duty-preview-bottom-actions .preview-btn--whatsapp {
  border-color: #128c4a;
  background: #128c4a;
  color: #fff;
}

.duty-preview-bottom-actions .preview-btn--whatsapp:hover {
  background: #0d773e;
  border-color: #0d773e;
}

@media print {
  .duty-preview-bottom-actions {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  #pdf-content {
    --duty-title-font-size: 12pt;
  }
}

#dynamic-pdf-table tbody td {
  height: 55px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  #pdf-content {
    --duty-title-font-size: 15pt;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  #pdf-content .duty-pdf-watermark {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
}
