html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8f9fa;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* BPMN Diagram Styles */
.bpmn-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bpmn-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e9ecef;
}

.bpmn-title {
  font-size: 2rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.bpmn-subtitle {
  font-size: 0.95rem;
  color: #6c757d;
  margin: 0;
  font-weight: 400;
}

.bpmn-diagram {
  width: 100%;
  height: 600px;
  min-height: 600px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  background-color: #ffffff;
  overflow: hidden;
  position: relative;
  cursor: default;
  user-select: none;
}

/* Hide BPMN.IO branding */
.bpmn-diagram .djs-palette,
.bpmn-diagram .djs-palette-entries,
.bpmn-diagram .bjs-powered-by {
  display: none !important;
}

/* Clean canvas background */
.bpmn-diagram .djs-container {
  background-color: #ffffff;
}

.bpmn-diagram .djs-container svg {
  background-color: #ffffff;
}

/* Hide grid pattern for cleaner look */
.bpmn-diagram .djs-container .djs-grid {
  display: none;
}

/* Improve diagram wrapper */
.bpmn-diagram-wrapper {
  position: relative;
  margin-top: 1rem;
}

/* Zoom controls */
.bpmn-zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.bpmn-zoom-controls button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  background: #ffffff;
  color: #495057;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
}

.bpmn-zoom-controls button:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #212529;
}

.bpmn-zoom-controls button:active {
  background: #e9ecef;
}

.bpmn-zoom-controls .zoom-level {
  text-align: center;
  font-size: 11px;
  color: #6c757d;
  padding: 4px 0;
  min-height: 20px;
  font-weight: 500;
}

.bpmn-zoom-controls .pan-hint {
  text-align: center;
  font-size: 16px;
  color: #6c757d;
  padding: 4px 0;
  cursor: help;
  border-top: 1px solid #e9ecef;
  margin-top: 4px;
  padding-top: 8px;
}

.bpmn-input {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background-color: #fbfbfc;
}

.bpmn-input-label {
  display: block;
  font-size: 0.9rem;
  color: #495057;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.bpmn-textarea {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.75rem;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  background-color: #ffffff;
  color: #212529;
  resize: vertical;
}

.bpmn-textarea:focus {
  outline: none;
  border-color: #adb5bd;
  box-shadow: 0 0 0 0.1rem rgba(0, 0, 0, 0.05);
}

.bpmn-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.bpmn-status {
  font-size: 0.85rem;
  color: #6c757d;
}

.bpmn-status.is-error {
  color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
  .bpmn-container {
    padding: 1rem 0.5rem;
  }
  
  .bpmn-title {
    font-size: 1.5rem;
  }
  
  .bpmn-diagram {
    height: 500px;
    min-height: 500px;
  }
}