/* =========================================================
   Reusable tutorial components
   Checklists, media cards, and responsive video
   ========================================================= */

.equipment-checklist {
  margin: 1.5rem 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid #555555;
  border-radius: 8px;
  background: #ffffff;
}

.equipment-checklist legend {
  margin-left: 1rem;
  padding: 0 0.5rem;
  font-weight: 700;
}

.equipment-checklist > .checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.equipment-checklist > .checklist-item + .checklist-item {
  border-top: 1px solid #cccccc;
}

.checklist-item:hover {
  background: #f5f5f5;
}

.checklist-item input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
}

.checklist-item span {
  min-width: 0;
}

.checklist-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.checklist-item:has(input:checked) {
  background: #eeeeee;
}

.checklist-item:has(input:checked) span {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.media-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin: 1.5rem 0;
}

.media-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #777777;
  border-radius: 8px;
  background: #ffffff;
}

.media-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.media-card figcaption {
  padding: 0.75rem 1rem;
  border-top: 1px solid #777777;
  background: #f5f5f5;
  font-weight: 600;
}

.video-wrapper {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto;
}

.video-wrapper iframe,
.video-wrapper video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 700px) {
  .media-grid--two {
    grid-template-columns: 1fr;
  }

  .equipment-checklist > .checklist-item {
    padding: 0.8rem;
  }
}

@media print {
  .video-wrapper {
    display: none;
  }

  .checklist-item:has(input:checked) span {
    text-decoration: none;
  }
}

/* ========================================
   INTERACTIVE IMAGE REFERENCE
======================================== */

.interactive-reference {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.interactive-reference__image {
  position: relative;
  width: 100%;
}

.interactive-reference__image img {
  display: block;
  width: 100%;
  height: auto;
}

.interactive-reference__hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.3);
}

.interactive-reference__hotspot:hover,
.interactive-reference__hotspot:focus-visible,
.interactive-reference__hotspot.is-active {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.interactive-reference__hotspot:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.interactive-reference__panel {
  padding: 1.5rem;
  border: 1px solid #cccccc;
  border-radius: 0.75rem;
  background: #f7f7f7;
}

.interactive-reference__content h3 {
  margin-top: 0;
}

.interactive-reference__content p:last-child {
  margin-bottom: 0;
}

.interactive-reference__number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 0 1rem;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

@media (max-width: 800px) {
  .interactive-reference {
    grid-template-columns: 1fr;
  }
}