/* Formulário Público - Projetos Missionários */

.pm-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.pm-form-title {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

/* Honeypot - escondido */
.pm-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

/* Form Groups */
.pm-form-group {
  margin-bottom: 24px;
}

.pm-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.pm-label .required {
  color: #dc3545;
}

/* Inputs */
.pm-input,
.pm-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fafafa;
}

.pm-input:focus,
.pm-textarea:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
  background: #fff;
}

.pm-textarea {
  resize: vertical;
  min-height: 100px;
}

.pm-textarea-large {
  min-height: 180px;
}

/* Help Text */
.pm-help-text,
.pm-help-text-above {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

.pm-help-text-above {
  margin-top: 0;
  margin-bottom: 8px;
  font-style: italic;
}

/* File Upload */
.pm-file-upload,
.pm-gallery-upload {
  position: relative;
}

.pm-file-input,
.pm-file-input-multiple {
  width: 100%;
  padding: 12px;
  border: 2px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.pm-file-input:hover,
.pm-file-input-multiple:hover {
  border-color: #2271b1;
}

/* Thumbnail Preview */
.pm-thumbnail-preview {
  margin-top: 10px;
}

.pm-thumbnail-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
}

/* Gallery Preview */
.pm-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.pm-gallery-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
}

.pm-gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
}

.pm-gallery-preview-item .pm-remove-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.pm-gallery-preview-item .pm-remove-preview:hover {
  background: #c82333;
}

/* Checkbox */
.pm-checkbox-group {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.pm-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.pm-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Checkbox List (Categorias) */
.pm-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.pm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 15px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.pm-checkbox-item:hover {
  border-color: #2271b1;
  background: #f0f6fc;
}

.pm-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #2271b1;
}

.pm-checkbox-item input[type="checkbox"]:checked + span {
  color: #2271b1;
  font-weight: 600;
}

.pm-checkbox-item span {
  font-size: 14px;
  color: #333;
}

/* Messages */
.pm-form-messages {
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 15px;
}

.pm-form-messages.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.pm-form-messages.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Submit Button */
.pm-form-submit {
  margin-top: 30px;
  text-align: center;
}

.pm-submit-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 16px 40px !important;
  background: var(
    --pm-btn-bg,
    linear-gradient(135deg, #2271b1 0%, #135e96 100%)
  ) !important;
  color: var(--pm-btn-color, #fff) !important;
  border: none !important;
  border-radius: var(--pm-btn-radius, 6px) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-width: 200px !important;
}

.pm-submit-btn:hover:not(:disabled) {
  background: var(
    --pm-btn-hover-bg,
    linear-gradient(135deg, #135e96 0%, #0a4570 100%)
  ) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3) !important;
}

.pm-submit-btn:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

/* Spinner */
.pm-spinner {
  animation: pm-rotate 2s linear infinite;
  width: 20px;
  height: 20px;
}

.pm-spinner .path {
  stroke: #fff;
  stroke-linecap: round;
  animation: pm-dash 1.5s ease-in-out infinite;
}

@keyframes pm-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pm-dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* Error State */
.pm-input.error,
.pm-textarea.error {
  border-color: #dc3545;
}

.pm-field-error {
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
}

/* Success State */
.pm-form-success {
  text-align: center;
  padding: 40px;
}

.pm-form-success-icon {
  width: 80px;
  height: 80px;
  background: #d4edda;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.pm-form-success-icon svg {
  width: 40px;
  height: 40px;
  stroke: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
  .pm-form-wrapper {
    padding: 20px;
    margin: 0 15px;
  }

  .pm-form-title {
    font-size: 22px;
  }

  .pm-submit-btn {
    width: 100%;
    padding: 14px 30px;
  }

  .pm-gallery-preview-item {
    width: 80px;
    height: 80px;
  }
}
