/* Pro Per Portal - Final Questions Modal */

.ppm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.ppm-dialog {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.ppm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 2px solid #005ea2;
}

.ppm-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #1b2b85;
}

.ppm-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #565c65;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.ppm-close:hover {
  color: #1b2b85;
  background-color: #f3f3f3;
}

.ppm-close:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
}

.ppm-body {
  padding: 1.5rem 2rem;
}

.ppm-errors {
  background-color: #fff0f0;
  border: 2px solid #d63e04;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #d63e04;
}

.ppm-errors:focus {
  outline: 3px solid #d63e04;
  outline-offset: 2px;
}

.ppm-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.ppm-errors li {
  margin-bottom: 0.25rem;
}

.ppm-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.ppm-legend {
  font-weight: bold;
  color: #1b1b1b;
  margin-bottom: 0.75rem;
  padding: 0;
}

.ppm-required {
  color: #d63e04;
}

.ppm-radio-group {
  display: flex;
  gap: 1.5rem;
}

.ppm-radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0.25rem 0;
}

.ppm-radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #005ea2;
  cursor: pointer;
}

.ppm-radio-label input[type="radio"]:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
}

.ppm-field {
  margin-bottom: 1.5rem;
}

.ppm-label {
  display: block;
  font-weight: bold;
  color: #1b1b1b;
  margin-bottom: 0.5rem;
}

.ppm-select {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #565c65;
  border-radius: 4px;
  background-color: #fff;
  font-size: inherit;
  font-family: inherit;
  min-height: 44px;
  box-sizing: border-box;
}

.ppm-select:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
  border-color: #005ea2;
}

.ppm-input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #565c65;
  border-radius: 4px;
  font-size: inherit;
  font-family: inherit;
  min-height: 44px;
  box-sizing: border-box;
}

.ppm-input:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
  border-color: #005ea2;
}

.ppm-input:disabled {
  background-color: #f3f3f3;
  color: #757575;
  border-color: #dfe1e2;
}

.ppm-checkbox-group {
  margin-top: 0.75rem;
}

.ppm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0.25rem 0;
}

.ppm-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #005ea2;
  cursor: pointer;
}

.ppm-checkbox-label input[type="checkbox"]:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
}

.ppm-footer {
  padding: 1rem 2rem 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.ppm-submit-btn {
  background-color: #005ea2;
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-size: inherit;
  font-weight: bold;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  min-height: 44px;
  min-width: 120px;
}

.ppm-submit-btn:hover {
  background-color: #1b2b85;
}

.ppm-submit-btn:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
}

/* Responsive */
@media screen and (max-width: 640px) {
  .ppm-overlay {
    padding: 0.5rem;
  }

  .ppm-dialog {
    max-height: 95vh;
    border-radius: 4px;
  }

  .ppm-header,
  .ppm-body,
  .ppm-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ppm-radio-group {
    flex-direction: column;
    gap: 0;
  }

  .ppm-submit-btn {
    width: 100%;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .ppm-dialog {
    border: 3px solid #000;
  }

  .ppm-select,
  .ppm-input {
    border-width: 2px;
  }

  .ppm-close:focus,
  .ppm-select:focus,
  .ppm-input:focus,
  .ppm-submit-btn:focus,
  .ppm-radio-label input:focus,
  .ppm-checkbox-label input:focus {
    outline-width: 4px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ppm-overlay,
  .ppm-dialog,
  .ppm-submit-btn,
  .ppm-close {
    transition: none;
  }
}

/* Print - hide modal */
@media print {
  .ppm-overlay {
    display: none !important;
  }
}
