/* Tooth & gap markers */

.tooth__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marker-item {
  position: absolute;
  pointer-events: none;
}

.marker-item--attachment {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-item--button_cut_out {
  top: 4px;
  right: 2px;
}

.marker-item--lingual_button {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.marker-item--missing_tooth,
.marker-item--extract {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-item--hook_slit {
  top: 6px;
  left: 4px;
}

.marker-item--power_arm {
  bottom: 8px;
  right: 4px;
}

.marker-item--ipr_tooth {
  top: 10%;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
}

.marker-item--ipr_side {
  top: 10%;
  bottom: 10%;
  width: 4px;
}

.marker-item--ipr_side.marker-ipr-side--mesial {
  left: 0;
}

.marker-item--ipr_side.marker-ipr-side--distal {
  right: 0;
}

.tooth__icon {
  position: relative;
}

.tooth--has-marker .tooth__number {
  color: #38bdf8;
  font-weight: 700;
}

.tooth--has-marker .tooth__crown {
  fill: #334155;
}

/* Attachment */
.marker-attachment {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-attachment__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* Button cut out */
.marker-button-cutout svg {
  width: 20px;
  height: 20px;
}

/* Lingual button */
.marker-lingual-button svg {
  width: 22px;
  height: 14px;
}

/* Missing / Extract X */
.marker-x svg {
  width: 28px;
  height: 28px;
}

.marker-x--blue line {
  stroke: #3b82f6;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.marker-x--red line {
  stroke: #dc2626;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Hook / slit */
.marker-hook-slit svg {
  width: 18px;
  height: 18px;
}

/* Power arm */
.marker-power-arm svg {
  width: 18px;
  height: 18px;
}

/* IPR on tooth */
.marker-ipr-tooth svg,
.marker-ipr-side svg {
  width: 4px;
  height: 100%;
  display: block;
}

.marker-ipr-side {
  width: 4px;
  height: 100%;
}

/* Gap elements */
.tooth-gap {
  flex: 0 0 10px;
  min-width: 8px;
  max-width: 14px;
  align-self: stretch;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: flex 0.2s ease, min-width 0.2s ease, max-width 0.2s ease, background 0.12s;
}

.tooth-gap--narrow {
  flex: 0 0 4px !important;
  min-width: 4px !important;
  max-width: 4px !important;
}

.tooth-gap--collapsed {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

.arch-midline-gap.tooth-gap--collapsed {
  width: 0 !important;
  min-width: 0 !important;
}

.dental-arch--upper .tooth-gap {
  align-self: flex-end;
  height: 88px;
  margin-bottom: 0;
}

.dental-arch--lower .tooth-gap {
  align-self: flex-start;
  height: 88px;
  margin-top: 0;
}

.tooth-gap:hover {
  background: #fff7ed;
}

.tooth-gap--excluded,
.arch-midline-gap.tooth-gap--excluded {
  opacity: 0.25;
  pointer-events: none;
  cursor: not-allowed;
}

.tooth-gap--excluded:hover,
.arch-midline-gap.tooth-gap--excluded:hover {
  background: transparent;
}

.tooth-gap--flash,
.arch-midline-gap--flash {
  background: #ffedd5;
  outline: 2px solid #14b8a6;
  outline-offset: -1px;
}

/* IPR gap marker */
.gap-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 100%;
}

.gap-marker__label {
  font-size: 0.5625rem;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  margin-bottom: 2px;
}

.gap-marker__line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: #f97316;
  border-radius: 1px;
}

.gap-marker__amount {
  font-size: 0.5625rem;
  font-weight: 600;
  color: #f97316;
  line-height: 1;
  margin-top: 2px;
  white-space: nowrap;
}

/* Midline gap between quadrants */
.arch-midline-gap {
  width: 16px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  align-self: stretch;
  border-radius: 2px;
  transition: background 0.12s;
}

.dental-arch--upper .arch-midline-gap {
  height: 88px;
  align-self: flex-end;
}

.dental-arch--lower .arch-midline-gap {
  height: 88px;
  align-self: flex-start;
}

.arch-midline-gap:hover {
  background: #fff7ed;
}


.arch-midline {
  width: 0;
  flex-shrink: 0;
}
