/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */
/* app/assets/stylesheets/symbols.css */
.text-fluid {
  font-size: clamp(0.875rem, 2vw, 1.25rem);
}

/* Fix nested form alignment */
[data-nested-form-target="item"] {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

/* Unified Diagram Styles */
.diagram-container {
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none
}

.diagram-container svg {
  position: relative;
  max-width: 100%;
  height: auto;
  top: unset;
  left: unset;
}

.control-point,
.handle,
.symbol {
  touch-action: none;
}

/* Unified Step Styles */
.step-container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Remove last child border */
.step-container:last-child {
  border-bottom: none;
}

.step-order {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  position: sticky;
  top: 1rem;
}

.step-content {
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 0;
}

.step-diagram,
.step-explanation {
  overflow: hidden;
  background: white;
}

/* Fix overlay positioning */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  background-color: rgba(0, 0, 0, 0.5);
}

.step-diagram:hover .overlay {
  opacity: 1;
}

/* Responsive layout */
@media (min-width: 768px) {
  .step-content {
    display: flex;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

.responsive-steps>.step-container:last-child,
.step-container:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.step-content hr.rounded {
  display: none;
}