/* Onlyfy Application Form Styles */
.onlyfy-application-form-wrapper {
  width: 100%;
  max-width: 100%;
}

.onlyfy-application-form {
  width: 100%;
}

.onlyfy-form-fields-wrapper {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -5px;
}

.onlyfy-field-group {
  width: 100%;
  padding: 0 5px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.onlyfy-field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.onlyfy-required-mark {
  color: #e74c3c;
  margin-left: 3px;
}

.onlyfy-field {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.onlyfy-field:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

.onlyfy-field:invalid {
  border-color: #e74c3c;
}

/* Field sizes */
.onlyfy-size-xs .onlyfy-field { padding: 6px 8px; font-size: 12px; }
.onlyfy-size-sm .onlyfy-field { padding: 8px 12px; font-size: 14px; }
.onlyfy-size-md .onlyfy-field { padding: 10px 14px; font-size: 16px; }
.onlyfy-size-lg .onlyfy-field { padding: 12px 16px; font-size: 18px; }
.onlyfy-size-xl .onlyfy-field { padding: 14px 18px; font-size: 20px; }

/* Dropzone Styles */
.onlyfy-dropzone {
  position: relative;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 20px;
  text-align: center;
}

.onlyfy-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.onlyfy-dropzone:hover {
  border-color: #007cba;
  background-color: #f0f8ff;
}

.onlyfy-dropzone.dragover {
  border-color: #007cba;
  background-color: #e7f3ff;
  transform: scale(1.02);
}

.onlyfy-dropzone-content {
  pointer-events: none;
}

.onlyfy-dropzone-icon {
  font-size: 32px;
  margin-bottom: 16px;
  color: #333;
}

.onlyfy-dropzone-icon svg {
  width: 1em;
  height: 1em;
  display: block;
  margin: 0 auto;
}

.onlyfy-dropzone-text {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.onlyfy-dropzone-info {
  font-size: 12px;
  color: #666;
}

/* File List Styles */
.onlyfy-file-list {
  margin-top: 16px;
}

.onlyfy-file-messages {
  margin-top: 8px;
}

.onlyfy-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 8px;
}

.onlyfy-file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onlyfy-file-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.onlyfy-file-size {
  font-size: 12px;
  color: #666;
}

.onlyfy-file-remove {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.3s ease;
}

.onlyfy-file-remove:hover {
  background-color: #c0392b;
}

/* Submit Button Styles */
.onlyfy-submit-group {
  width: 100%;
  margin-top: 20px;
}

.onlyfy-submit-button {
  background-color: #007cba;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  justify-content: center;
}

.onlyfy-submit-button:hover:not(:disabled) {
  background-color: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.onlyfy-submit-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.onlyfy-button-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Messages Styles */
.onlyfy-form-messages {
  margin-top: 20px;
}

.onlyfy-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  white-space: pre-line;
}

.onlyfy-message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.onlyfy-message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.onlyfy-message-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (min-width: 768px) {
  .onlyfy-field-group.onlyfy-col-50 {
    width: 50%;
  }

  .onlyfy-field-group.onlyfy-col-33 {
    width: 33.333%;
  }

  .onlyfy-field-group.onlyfy-col-66 {
    width: 66.666%;
  }
}

@media (max-width: 767px) {
  .onlyfy-dropzone {
    min-height: 120px;
    padding: 16px;
  }

  .onlyfy-dropzone-icon {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .onlyfy-dropzone-text {
    font-size: 14px;
  }

  .onlyfy-file-item {
    padding: 10px 12px;
  }

  .onlyfy-submit-button {
    width: 100%;
    padding: 14px 20px;
  }
}

/* Field validation states */
.onlyfy-field-required .onlyfy-field:invalid {
  border-color: #e74c3c;
}

.onlyfy-field-required .onlyfy-field:valid {
  border-color: #27ae60;
}

/* Loading state */
.onlyfy-application-form.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Success template container */
.onlyfy-success-template {
  text-align: center;
  padding: 40px 20px;
}

.onlyfy-success-template h2 {
  color: #27ae60;
  margin-bottom: 20px;
}

.onlyfy-success-template p {
  color: #666;
  line-height: 1.6;
}
