/* ==================================================
   FIGUROOS CONFIGURATOR V3
   NAME + NUMBER
   ================================================== */


/* --------------------------------------------------
   PERSONALISATION
   -------------------------------------------------- */

.figuroos-personalise {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* --------------------------------------------------
   REAR PREVIEW
   -------------------------------------------------- */

.rear-preview-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 450px;
  margin: 12px auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;

  /*border: 3px solid #000;
  border-radius: 10px;*/
}


/* --------------------------------------------------
   REAR SHIRT
   -------------------------------------------------- */

.rear-preview-container .rear-shirt-base {

  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 1;
}


/* --------------------------------------------------
   PERSONALISATION OVERLAY
   -------------------------------------------------- */

.rear-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  z-index: 2;
}


/* --------------------------------------------------
   NAME
   -------------------------------------------------- */

.rear-name {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 45%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family:
    'Arial Black',
    sans-serif;

  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: #ffffff;
  text-align: center;
  z-index: 3;
}


/* --------------------------------------------------
   NUMBER
   -------------------------------------------------- */

.rear-number {
  position: absolute;
  top: 37%;
  left: 50%;
  transform: translateX(-50%);
  font-family:
    'Arial Black',
    sans-serif;

  font-size: clamp(4.9rem, 8vw, 6rem);
  color: #fff;
  text-align: center;
}


.rear-number-input {
  width: 35%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  z-index: 3;
}

.rear-name-input,
.rear-number-input {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  text-align: center;
  text-indent: 0;
  letter-spacing: normal;
  direction: ltr;
  border-radius: 8px;
  caret-color: #2563eb;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

@media (hover: hover) {
  .rear-name-input:hover,
  .rear-number-input:hover {
    background-color: rgba(226, 232, 240, 0.18);
    box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.55);
  }
}

.rear-name-input:focus,
.rear-number-input:focus {
  background-color: rgba(226, 232, 240, 0.3);
  box-shadow: 0 0 0 2px #2563eb, 0 0 0 4px rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .rear-name-input,
  .rear-number-input {
    transition: none;
  }
}

/* --------------------------------------------------
   INPUTS
   -------------------------------------------------- */

.personalise-inputs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}


.personalise-inputs label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  max-width: 300px;
  font-weight: 600;
}


.personalise-inputs input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
}

/* ==================================================
   MOBILE NAME + NUMBER
   Compact controls beneath sticky live preview
   ================================================== */

@media (max-width: 899px) {

  .personalise-inputs {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr) 90px;

    gap: 6px 8px;
    align-items: end;
  }


  .personalise-inputs label {
    width: 100%;
    max-width: none;

    gap: 3px;

    font-size: 13px;
  }


  .personalise-inputs label:nth-child(3) {
    grid-column: 1 / -1;
  }


  .personalise-inputs input {
    min-height: 38px;

    padding: 6px 8px;

    font-size: 16px;
  }


  #figuroos-text-colour {
    height: 32px;
  }

}

@media (max-width: 899px) {

  .figuroos-menu-panel.is-open>.figuroos-menu-trigger {
    background-color: #eeeeee;
    border-left: 4px solid #6f2cff;
    font-weight: 700;
  }

  .figuroos-menu-panel.is-open>.figuroos-menu-trigger::after {
    content: "CURRENT STEP";
    float: right;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;

    color: #6f2cff;
  }

  .figuroos-menu-panel[data-step="6"].is-open>.figuroos-menu-trigger::after {
    content: "LAST STEP";
  }

}

/* --------------------------------------------------
   COLOUR + NAME/NUMBER INSTRUCTION
   -------------------------------------------------- */

.figuroos-colour-instruction-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}


.figuroos-colour-instruction-row label {
  width: 20%;
  min-width: 110px;
}


#figuroos-text-colour {
  width: 100%;
}


.figuroos-name-number-hint {
  flex: 1;
  margin: 0;
  padding-bottom: 8px;

  font-size: 14px;
  line-height: 1.25;
}


/* ==================================================
   NAME + NUMBER PLACEHOLDERS
   ================================================== */

.rear-name::placeholder,
.rear-number::placeholder {
  color: #334155;
  opacity: 1;
  text-shadow:
    -1px -1px 1px rgba(255, 255, 255, 0.9),
    1px -1px 1px rgba(255, 255, 255, 0.9),
    -1px 1px 1px rgba(255, 255, 255, 0.9),
    1px 1px 1px rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .rear-name:not(:focus)::placeholder,
  .rear-number:not(:focus)::placeholder {
    animation: figuroos-ghost-pulse 2s ease-in-out infinite;
  }
}

@keyframes figuroos-ghost-pulse {
  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}