/* PDFForm Library Styles */

/* Field zone styles */
.pdfform-field-zone {
  position: absolute;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pdfform-field-zone.unmapped {
  border: 2px solid #f44336;
}

.pdfform-field-zone.mapped {
  border: 2px solid #4CAF50;
}

.pdfform-field-zone:hover {
  border: 2px dashed #2196F3;
  background: rgba(33, 150, 243, 0.1);
}

.pdfform-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #4CAF50;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 4px;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  pointer-events: none;
}

/* Modal styles */
.pdfform-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdfform-modal * {
  box-sizing: border-box;
}

.pdfform-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdfform-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pdfform-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.pdfform-modal-close {
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdfform-modal-close:hover {
  color: #333;
}

.pdfform-modal-form {
  margin: 0;
}

.pdfform-form-group {
  margin-bottom: 15px;
}

.pdfform-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.pdfform-checkbox-label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
}

.pdfform-checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.pdfform-input,
.pdfform-input-readonly {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.pdfform-input:focus {
  outline: none;
  border-color: #2196F3;
}

.pdfform-input-readonly {
  background: #f5f5f5;
  color: #666;
  font-family: monospace;
}

.pdfform-required {
  color: #f44336;
}

.pdfform-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

.pdfform-error {
  display: none;
  color: #f44336;
  font-size: 12px;
  margin-top: 5px;
}

.pdfform-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.pdfform-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.pdfform-btn:hover {
  background: #f0f0f0;
}

.pdfform-btn-primary {
  background: #2196F3;
  color: white;
  border: none;
}

.pdfform-btn-primary:hover {
  background: #1976D2;
}

.pdfform-btn-danger {
  background: #f44336;
  color: white;
  border: none;
  margin-right: auto;
}

.pdfform-btn-danger:hover {
  background: #d32f2f;
}

/* Page navigation */
.pdfform-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-top: 1px solid #ddd;
}

.pdfform-page-info {
  font-size: 14px;
  color: #666;
}

/* Progress bar */
.pdfform-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.pdfform-progress-bar {
  flex: 1;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.pdfform-progress-fill {
  height: 100%;
  background: #4CAF50;
  transition: width 0.3s;
}