/* ==================================================================
   JUSTPIXEL SOFTWARE LIBRARY
   DECISION WHEEL
   ================================================================== */

.jp-decision-wheel {
  display: grid;

  grid-template-columns:
    minmax(280px, 0.75fr)
    minmax(0, 1.25fr);

  gap: var(--jp-space-6);

  align-items: start;
}

/* ==================================================================
   PANELS
   ================================================================== */

.jp-wheel-panel {
  padding: var(--jp-space-6);

  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius-md);

  background: var(--jp-surface);

  box-shadow: var(--jp-shadow-sm);
}

/* ==================================================================
   OPTIONS
   ================================================================== */

.jp-wheel-options-input {
  min-height: 220px;

  height: clamp(220px, 32vh, 300px);

  resize: vertical;

  line-height: var(--jp-leading-relaxed);
}

.jp-wheel-options-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: var(--jp-space-4);

  margin-top: var(--jp-space-4);

  color: var(--jp-text-muted);

  font-size: var(--jp-text-sm);
}

/* ==================================================================
   STAGE
   ================================================================== */

.jp-wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: var(--jp-space-5);
}

/* ==================================================================
   WHEEL
   ================================================================== */

.jp-wheel-wrapper {
  position: relative;

  width: min(100%, 440px, 48vh);

  aspect-ratio: 1;
}

.jp-wheel-canvas {
  display: block;

  width: 100%;
  height: auto;

  border-radius: 50%;

  box-shadow: var(--jp-shadow);
}

/* ==================================================================
   POINTER
   ================================================================== */

.jp-wheel-pointer {
  position: absolute;

  top: -5px;
  left: 50%;

  z-index: 2;

  width: 0;
  height: 0;

  transform: translateX(-50%);

  border-left: 16px solid transparent;

  border-right: 16px solid transparent;

  border-top: 30px solid var(--jp-navy-950);
}

/* ==================================================================
   SPIN BUTTON
   ================================================================== */

.jp-wheel-spin-button {
  width: min(100%, 320px);

  padding: 1rem 1.25rem;
}

/* ==================================================================
   RESULT
   ================================================================== */

.jp-wheel-result {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: var(--jp-space-2);

  width: min(100%, 420px);

  padding: var(--jp-space-4) var(--jp-space-5);

  text-align: center;

  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius-md);

  background: var(--jp-surface-accent);
}

.jp-wheel-result-label {
  color: var(--jp-primary);

  font-size: var(--jp-text-xs);
  font-weight: var(--jp-weight-bold);

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.jp-wheel-result strong {
  color: var(--jp-text);

  font-size: 1.4rem;

  word-break: break-word;
}

/* ==================================================================
   TABLET
   ================================================================== */

@media (max-width: 950px) {
  .jp-decision-wheel {
    grid-template-columns: 1fr;
  }

  .jp-wheel-options-input {
    min-height: 220px;

    height: 240px;
  }
}

/* ==================================================================
   MOBILE
   ================================================================== */

@media (max-width: 550px) {
  .jp-wheel-panel {
    padding: var(--jp-space-4);
  }

  .jp-wheel-options-meta {
    align-items: stretch;

    flex-direction: column;
  }

  .jp-wheel-options-meta .jp-tool-button {
    width: 100%;
  }

  .jp-wheel-result strong {
    font-size: var(--jp-text-xl);
  }
}
