/* Remove automatic horizontal margins */
.dentist-form-wrapper {
  position: relative;
}

.form-overlay-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  /* white overlay */
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  z-index: 999;
  border-radius: 8px;
  /* match form style */
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  /* WordPress blue */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.dentist-form-wrapper {
  width: 60vw;
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin-top: 40px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

@media (max-width: 768px) {
  .dentist-form-wrapper {
    width: 80vw;
  }
}

.dentist-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.dentist-form-fields input[type="text"],
.dentist-form-wrapper input[type="date"] {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.missing-teeth-input {
  flex: 1;
  padding: 6px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.3s;
  margin-left: 5px;
}

.dentist-form-fields input[type="text"]:focus,
.dentist-form-wrapper input[type="date"]:focus,
.missing-teeth-input:focus {
  border-color: #4a90e2;
  outline: none;
}

/* Each condition group */
.dentist-section {
  margin-bottom: 30px;
}

.dentist-section h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

/* Checkbox grid */
.dentist-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.dentist-checkbox-group label {
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #555;
  cursor: pointer;
}

.dentist-checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  accent-color: #4a90e2;
}

.actions {
  display: flex;
}

/* Submit button */
.dentist-form-wrapper button[type="submit"],
#generate-new-report-btn,
#download-report-btn,
#download-doc-btn {
  background-color: #4a90e2;
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin-top: 10px;
  width: 100%;
  text-decoration: none;
  text-align: center;
}

.dentist-form-wrapper button[type="submit"]:hover,
#generate-new-report-btn:hover,
#download-report-btn:hover,
#download-doc-btn:hover {
  background-color: #3b7dc4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dentist-form-fields {
    flex-direction: column;
  }

  .dentist-checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* --- Shared Container & Header Styles --- */
.tpp-form-container {
  font-family: Arial, sans-serif;
  /* padding-inline: 50px; */
  /* padding-block: 10px; */
  max-width: 850px;
  margin: 20px auto;
  background-color: #fff;
  color: #333;
  line-height: 1.5;
}

.tpp-form-header {
  text-align: center;
  margin-bottom: 20px;
}

.tpp-logo {
  max-width: 250px;
  height: auto;
}

/* --- Shared Patient Info Styles --- */
.tpp-patient-info {
  margin-top: 10px;
  margin-bottom: 15px;
}

.tpp-patient-info.page1 {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 25px;
}

/* Page 2 & 3 just show name */
.tpp-patient-info.page2 p,
.tpp-patient-info.page3 p {
  margin-bottom: 0;
}

.tpp-patient-info span {
  /* Shared style for data spans */
  font-weight: normal;
}

/* --- Shared Underline Style --- */
.tpp-underline {
  /* Generic underline */
  /*   text-decoration: underline; */
}

/* --- Page 1 Specific Styles --- */
.tpp-form-title-highlight {
  /* Still has cyan background */

  display: inline-block;
  padding: 5px 10px;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.1em;
  font-weight: bold;
}

.tpp-metadata {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  font-style: italic;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.tpp-metadata span {
  font-style: normal;
}

.tpp-section {
  margin-bottom: 20px;
}

.tpp-section h2 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000;
}

.tpp-section1 {
  display: flex;
  align-items: baseline;
  font-size: 1.2em;
  font-weight: bold;
  color: #000;
}

.tpp-section1 p {
  display: flex;
  align-items: center;
}

#tpp-chief-complaint,
#tpp-medical-issues,
#tpp-patient-goals {
  margin-left: 5px;
}

#tpp-problem-list {
  list-style: none;
  padding-left: 0;
  margin-top: 5px;
}

#tpp-problem-list li {
  margin-bottom: 5px;
  padding-left: 15px;
  position: relative;
}

#tpp-problem-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  top: 0;
}

/* --- Page 2 Specific Styles --- */
.tpp-intro-text p {
  /* Also used on Page 3 intro */
  font-size: 0.9em;
  margin-bottom: 10px;
}

/* Table Styles */
.tpp-strategy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9em;
}

.tpp-strategy-table th,
.tpp-strategy-table td {
  border: 1px solid #000;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.tpp-strategy-table thead th {
  background-color: #c9daf8;
  font-weight: bold;
  text-align: center;
}

.tpp-strategy-table td:last-child,
.tpp-strategy-table th:last-child {
  text-align: center;
}

/* --- Page 3 Specific Styles --- */
#tpp-phase-plan-title {
  text-align: center;
  font-weight: bold;
  font-size: 1.3em;
  /*   text-decoration: underline; */
  margin-bottom: 20px;
}

/* Use .tpp-intro-text styles from Page 2 */
.tpp-phase-intro {
  margin-bottom: 25px;
}

.tpp-phase-section {
  margin-bottom: 20px;
}

.tpp-phase-section h3 {
  font-weight: bold;
  /*   text-decoration: underline; */
  margin-bottom: 8px;
  font-size: 1.1em;
}

.tpp-phase-list {
  list-style: none;
  padding-left: 0;
  margin-top: 5px;
}

.tpp-phase-list li {
  margin-bottom: 4px;
  /* List items are blue */
  padding-left: 10px;
  /* Optional slight indent */
}

/* Style for specific formatting within intro text */
.tpp-phase-intro b {
  font-weight: bold;
}

.tpp-phase-intro i {
  font-style: italic;
}

#tpp-prepared-by,
#tpp-date-prepared {
  padding-left: 5px;
}
