/* Popup Modal Styles */
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.popup-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bloqueia scroll quando popup está aberto */
body.popup-open {
  overflow: hidden;
  height: 100vh;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 4, 36, 0.8);
  backdrop-filter: blur(5px);
}

.popup-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 48px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: rgba(32, 4, 36, 0.5);
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.popup-close:hover {
  color: #9b13ae;
}

.popup-screen {
  display: block;
}

.popup-screen.hidden {
  display: none;
}

.popup-title {
  color: #200424;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 32px;
  line-height: 130%;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
}

.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-option-btn {
  background: #f0eef1;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 24px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #200424;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.popup-option-btn:hover {
  background: #e9e6ea;
  border-color: #9b13ae;
  transform: translateY(-2px);
}

.popup-option-btn:active {
  transform: translateY(0);
}

.popup-btn-text {
  display: block;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #200424;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.form-group input,
.form-group select {
  background: #f0eef1;
  border: 1px solid rgba(32, 4, 36, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  color: #200424;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #9b13ae;
  background: #ffffff;
}

.form-group input::placeholder {
  color: rgba(32, 4, 36, 0.5);
}

.popup-submit-btn {
  background: #9b13ae;
  border: none;
  border-radius: 8px;
  padding: 18px 24px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.popup-submit-btn:hover {
  background: #831093;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 19, 174, 0.3);
}

.popup-submit-btn:active {
  transform: translateY(0);
}

.popup-message {
  color: rgba(32, 4, 36, 0.8);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 150%;
  text-align: center;
  margin-bottom: 32px;
}

/* Botão centralizado para tela de paciente */
#pacienteScreen .popup-submit-btn {
  display: block;
  margin: 0 auto;
  width: fit-content;
  min-width: 350px;
}

#captchaPopup {
  display: flex;
  justify-content: center;
}

/* Checkbox de Política de Privacidade */
.form-group-checkbox {
  margin: 8px 0;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-left: 32px;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 20px;
  width: 20px;
  left: 0;
  top: 2px;
  z-index: 1;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 2px;
  height: 20px;
  width: 20px;
  background-color: #f0eef1;
  border: 2px solid rgba(32, 4, 36, 0.15);
  border-radius: 4px;
  transition: all 0.3s;
  pointer-events: none;
}

.checkbox-container input[type="checkbox"]:not(:checked):hover ~ .checkmark {
  background-color: #e9e6ea;
  border-color: #9b13ae;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #9b13ae;
  border-color: #9b13ae;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label {
  color: rgba(32, 4, 36, 0.8);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  line-height: 150%;
}

.checkbox-label a {
  color: #9b13ae;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.checkbox-label a:hover {
  color: #831093;
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .popup-content {
    padding: 32px 24px;
    max-width: 95%;
  }

  .popup-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .popup-option-btn {
    padding: 20px;
    font-size: 16px;
  }

  .popup-close {
    top: 16px;
    right: 16px;
    font-size: 28px;
  }

  .form-group input,
  .form-group select {
    font-size: 14px;
  }
}
