html {
  background-color: #d4d4d7;
}
.h-60vh{
    height: 60vh;
}
.form-label {
    margin-top: 0.5rem;
    margin-bottom: 0;
}
body {
  background-color: #d4d4d7;
  width: 100%;
  max-width: 1320px;
  margin: 2rem auto;
}
#pdf-html {
  margin: auto;
  width: 95%;
  border-radius: 15px;
  box-shadow: 0px 0px 3px 3px #b4b4b5;
  background-color: #fff;
}

.modal-content {
  border-radius: 10px;
  padding: 20px;
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.modal-body p {
  font-size: 16px;
  text-align: center;
  margin-bottom: 0;
}

.modal-footer {
  justify-content: center;
}

button {
  font-size: 16px;
}

fieldset {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 25px;
  margin-bottom: 20px;
  position: relative;
}

legend {
  padding: 0 10px;
  position: relative;
  top: -2em;
  max-width: 200px;
}
.text-legend {
  background: white;
  font-size: 17px;
  font-weight: bold;
  color: #000;
  padding: 0 5px;
}

#medicalHistoryOne,
#medicalHistoryTwo,
#dentalHistory {
  min-height: 250px;
}

#noDentalHistory {
  margin-left: 0 !important; /* Remove extra spacing */
}
h4 {
  margin-top: 1em;
  font-size: 1.25rem;
  font-weight: bold;
}
h5 {
  font-size: 16px;
  font-weight: bold;
}
h6 {
  margin-top: -1em;
  padding: 1em;
  font-size: 10px;
  color: rgb(196, 4, 4);
  font-style: italic;
  font-weight: bold;
}
.consentParagraph {
  font-weight: bold;
}
.form-check-input {
  margin-left: 1em;
  min-width: 16px;
  min-height: 16px;
  border: 1px #868686 solid;
}

#medicalConditionsSection .form-check {
  margin-bottom: 10px;
}
#medicalConditionsSection .row {
  display: flex;
  flex-wrap: wrap;
}
#medicalConditionsSection .col-md-4 {
  padding-right: 15px;
}
#medicalConditionsSection input[type="checkbox"] {
  margin-right: 8px;
}

canvas {
  width: 100% !important;
  max-height: 250px;
  height: auto;
  border: 1px solid #ccc !important;
}

.card-header {
  background: #2d7ca5;
  color: #fff;
  display: flex; /* Ensure Flexbox is used */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  flex-direction: column; /* Stack elements vertically */
  text-align: center; /* Ensure text aligns properly */
  height: 100%; /* Ensure the header takes up available height */
  height: 65px; /* Optional: Add a minimum height for a consistent look */
}

.card-header h4 {
  margin-top: 5px;
  font-size: 1.5rem;
  line-height: 1.5rem;
}

.card-body {
  margin-top: 1em;
  margin-bottom: 1em;
}

.footer {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  padding: 2em; /* Add some padding */
  text-align: center;
}

.footer img {
  max-width: 200px; /* Ensure the logo doesn't exceed the container width */
  height: auto;
  margin-left: 0.5em; /* Add space between text and logo */
}
.form-control {
  border: 1px solid #bcbcbb;
}

/* Valid input style (only if clicked or typed and not empty) */
input:valid:not(:placeholder-shown):focus,
textarea:valid:not(:placeholder-shown):focus {
  border-color: #009165 !important; /* Green border */
  box-shadow: 0 0 0 0.2rem rgba(0, 145, 101, 0.25); /* Slight glow for focus */
}

/* Valid input style (only after interaction) */
input:valid:not(:placeholder-shown):not(:focus):not(:hover),
textarea:valid:not(:placeholder-shown):not(:focus):not(:hover) {
  border-color: #ccc; /* Default border color after losing focus */
  box-shadow: none;
}
.form-check-label {
  color: black !important;
}

.form-check-input:checked {
  background-color: #0d6efd !important;
}
/* Invalid input style */
input:invalid,
textarea:invalid {
  border-color: #dc3545; /* Red border */
  background-color: #f8d7da;
}

input:invalid:focus,
textarea:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.is-valid:focus {
  border-color: #009165;
}

.is-invalid {
  border-color: #dc3545;
  background-color: #f8d7da;
}
.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#customAlertTitle {
  text-align: center;
  width: 100%;
}

#customAlertModal .btn-primary {
  background-color: #2d7ca5;
  border-color: #2d7ca5;
}

#customAlertModal .btn-primary:hover {
  background-color: #1a5f78;
  border-color: #1a5f78;
}

#customAlertModal {
  display: none; /* Ensure the modal is hidden by default */
}

textarea {
  overflow: hidden; /* Prevent scrollbars */
  min-height: 50px; /* Optional: Set a base minimum height */
  resize: none; /* Disable manual resizing by the user */
}

#displayedPatientName,
#signatureDate {
  background-color: #fff;
  border: none !important;
  padding-left: 0;
  color: #525252;
}
.child-only {
  display: none;
}
.adult-only {
  display: none;
}
.card-header.text-center.child-patient {
  background: #65b3db;
  text-shadow: 0 0 3px black;
}
.card-header.text-center.adult-patient {
  background: #2d7ca5;
  text-shadow: 0 0 3px black;
}
.child-patient .child-only {
  display: block !important;
}
.adult-patient .adult-only {
  display: block !important;
}
#signatureCanvas {
  min-height: 85px;
}
.inline-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1em;
}

/* Hide arrows/spinners on number inputs (DOB fields) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}
@media print {
  * {
    overflow: visible !important;
  }

  #pdf-html {
    font-size: 10px;
  }

  #pdf-html h4 {
    font-size: 16px !important;
  }

  #pdf-html h1,
  h2,
  h3,
  h4 {
    font-size: 14px !important;
  }

  .form-check-label {
    margin-left: 0.5em;
  }
  input,
  label,
  input.form-control.is-valid {
    font-size: 10px !important;
  }

  #pdf-html h5,
  h6,
  legend,
  .text-legend {
    font-size: 13px !important;
  }

  fieldset {
    padding: 0px 12px 12px 12px;
  }

  legend {
    top: -11px;
  }

  #pdf-html {
    box-sizing: border-box;
  }

  textarea {
    height: auto !important;
  }

  /* Prevent text boxes from splitting across pages */
  textarea,
  input,
  legend,
  span {
    page-break-inside: avoid !important;
    word-wrap: break-word;
    overflow: hidden;
  }

  /* Prevent page break inside radio button groups */
  .radio-group,
  input[type="radio"] {
    page-break-inside: avoid !important;
    page-break-before: auto;
    page-break-after: auto;
  }

  /* Prevent page break inside paragraphs */
  p,
  label,
  div,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-inside: avoid !important;
    overflow: visible;
  }

  /* Ensure form rows stick together */
  .row {
    page-break-inside: avoid !important;
  }

  /* Prevent breaks in legends and fieldsets */
  legend,
  fieldset {
    page-break-inside: avoid !important;
  }

  /* Ensure radio buttons retain consistent size */
  input[type="radio"] {
    width: 16px;
    height: 16px;
  }

  /* Hide buttons and unnecessary elements for PDF */
  #submitButton,
  #clearSignature {
    display: none !important;
  }

  /* Adjust card and content alignment for PDF generation */
  .card {
    margin: 0 auto;
    padding: 20px;
    border: none !important;
    box-shadow: none !important;
  }

  /* Remove signature canvas border */
  #signatureCanvas {
    border: none;
    page-break-inside: avoid !important;
    height: 100px !important;
    width: 100%;
  }

  #signatureCanvas,
  img {
    max-width: 100%;
    height: auto;
  }
}

input[type="tel"],
input[type="date"] {
  max-width: 165px !important;
}
