/* Modal Form Styles */
#modal-evento {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00000080;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

#modal-evento > div {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin: auto;
}

#fechar-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 18px;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#fechar-modal:hover {
  background: #e9ecef;
  color: #495057;
}

#modal-titulo {
  color: #333;
  font-size: 18px;
  margin-bottom: 20px;
  padding-right: 50px;
}

/* Modal Info Section */
#modal-info-exame {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

#modal-info-exame > div {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

#modal-info-exame > div span:first-child {
  color: #D83135;
  font-weight: bold;
  margin-right: 8px;
}

#modal-info-exame > div span:last-child {
  color: #333;
  font-weight: 600;
}

#modal-nome-exame {
  color: #333;
  font-size: 16px;
  font-weight: 500;
}

/* Modal Informativo - Estilos específicos para evitar interferência do CSS global */
#modal-informativo * {
  box-sizing: border-box !important;
}

#modal-informativo .exam-detail-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#modal-informativo .exam-detail-number {
  background: #D83135 !important;
  color: white !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
}

#modal-informativo .exam-detail-content {
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 !important;
}

#modal-informativo .exam-detail-label {
  color: #495057 !important;
  font-size: 14px !important;
  display: block !important;
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  font-weight: bold !important;
}

#modal-informativo .exam-detail-value {
  color: #333 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

#modal-informativo .exam-detail-value.modalidade {
  font-size: 15px !important;
  line-height: 1.4 !important;
}
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #495057;
}

.modal-instructions p {
  margin: 0 0 10px 0;
}

.modal-instructions p:last-child {
  margin: 0;
}

/* Field Container */
.field-container {
  display: none;
  margin-top: 8px;
}

.field-container.show {
  display: block;
}

/* Form Elements */
#formulario-exame, #form-modal {
  margin: 0 auto;
  width: 100%;
}

#form-modal select,
#form-modal input[type="text"],
#form-modal input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  margin: 8px 0;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ffffff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

#form-modal select:focus,
#form-modal input[type="text"]:focus,
#form-modal input[type="email"]:focus {
  outline: none;
  border-color: #D83135;
  box-shadow: 0 0 0 3px rgba(216, 49, 53, 0.1);
}

#form-modal select:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

#form-modal label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  font-size: 14px;
}

.field-error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 5px rgba(220, 53, 69, 0.3) !important;
}

.field-error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: -10px;
  margin-bottom: 10px;
}

/* Loader */
.loader-checkout {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #D83135;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-message {
  font-size: 16px;
  color: #333;
  text-align: center;
  transition: opacity 0.3s ease;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
  #modal-evento {
    padding: 10px !important;
    align-items: flex-start !important;
  }
  
  #modal-evento > div {
    max-width: 100% !important;
    max-height: 95vh !important;
    padding: 20px !important;
    margin: 0 !important;
  }
  
  #fechar-modal {
    top: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 16px !important;
  }
  
  #modal-titulo {
    font-size: 16px !important;
    padding-right: 40px !important;
  }
}

@media (max-width: 480px) {
  #modal-evento {
    padding: 5px !important;
  }
  
  #modal-evento > div {
    padding: 15px !important;
    max-height: 98vh !important;
  }
  
  #modal-titulo {
    font-size: 14px !important;
  }
}
