/* ==================================================
   CONFIGURATOR MENU TABS
   ================================================== */

.figuroos-menu-trigger {
  display: block;

  width: 100%;

  padding: 16px;

  border: 0;
  background: transparent;

  font: inherit;
  font-weight: 700;

  text-align: left;

  cursor: pointer;
}


/* CURRENT / OPEN STEP */

.figuroos-menu-panel.is-open {
  background-color: #f1e9ff;
}

/* ==================================================
   CURRENT STEP HEADER
   ================================================== */

.figuroos-menu-panel.is-open
.figuroos-menu-trigger {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  align-items: center;

  column-gap: 12px;
}


/* CURRENT STEP */




/* NEXT */

.figuroos-next-step {
  justify-self: end;

  padding: 5px 8px;

  border: 1px solid #7c3aed;
  border-radius: 4px;

  background: transparent;

  color: #7c3aed;

  font-size: 11px;
  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;
}

/* ==================================================
   COMPLETED STEP
   Temporary visual test.
   JS state logic will be added separately.
   ================================================== */

.figuroos-menu-panel.is-complete:not(.is-open) {
  background-color: transparent;
}


.figuroos-menu-panel.is-complete:not(.is-open)
.figuroos-menu-trigger {
  color: #222222;
}



/* ==================================================
   MOBILE STEP GRID
   ================================================== */

@media (max-width: 899px) {

  #figuroos-configurator-controls {
    display: grid;

   grid-template-columns:
  repeat(6, minmax(0, 1fr));

    gap: 2px;
  }


  .figuroos-menu-panel {
    min-width: 0;
    margin: 0;
  }


.figuroos-menu-panel:not(.is-open)
.figuroos-menu-trigger {
  width: 100%;
 min-height: 48px;
padding: 6px 2px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  line-height: 1.15;
}


/* Closed panels themselves should only
   occupy the height of their navigation tile */

.figuroos-menu-panel:not(.is-open) {
  order: 1;

  min-height: 0;
  height: auto;
}


/* Ensure hidden content contributes
   nothing to grid height */

.figuroos-menu-panel:not(.is-open)
.figuroos-menu-content {
  display: none;
}


  /* Active step keeps the existing
     full-width editing experience */

  .figuroos-menu-panel.is-open {
    grid-column: 1 / -1;
  }


  /* Complete button always spans
     the entire grid */

  #figuroos-complete-button {
    grid-column: 1 / -1;
  }

}


/* ==================================================
   MOBILE STEP ORDER
   ================================================== */

@media (max-width: 899px) {

  #figuroos-complete-button {
    order: 7;
  }

  #figuroos-restart-button {
    order: 8;
    grid-column: 1 / -1;
  }

  #figuroos-mock-build-button {
    order: 9;
    grid-column: 1 / -1;
  }


  /* Active editing panel always rises
     above the navigation grid */

  .figuroos-menu-panel.is-open {
    order: 0;
    grid-column: 1 / -1;
  }

}

/* ==================================================
   MOBILE COMPACT STEP NAVIGATION
   ================================================== */

@media (max-width: 899px) {

  #figuroos-configurator-controls {
    gap: 6px;
  }

  .figuroos-configurator-step {
    min-height: 0;
    padding: 0;
    border-radius: 3px;
  }

  .figuroos-menu-trigger {
    min-height: 42px;

    padding-top: 8px;
    padding-right: 12px;
    padding-bottom: 8px;
    padding-left: 12px;

    font-size: 14px;
    line-height: 1.2;
  }

}
  
  
  /* ==================================================
   MOBILE LINEAR STEP NAVIGATION
   Closed step visual reset
   ================================================== */

@media (max-width: 899px) {

  .figuroos-menu-panel:not(.is-open) {
    background-color: transparent;
    border: 0;
    border-radius: 0;
  }

}

/* ==================================================
   MOBILE LINEAR STEP NODES
   ================================================== */

@media (max-width: 899px) {
    
 

  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger {
    position: relative;

    min-height: 54px;

    padding-top: 30px;
    padding-right: 1px;
    padding-bottom: 2px;
    padding-left: 1px;

    overflow: visible;

    font-size: 10px;
    font-weight: 700;

    background-color: transparent;
  }


  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger::before {
    content: "";

    position: absolute;

    top: 4px;
    left: 50%;

    width: 20px;
    height: 20px;

    transform: translateX(-50%);

    border: 2px solid #7c3aed;
    border-radius: 50%;

    background-color: #ffffff;

    box-sizing: border-box;
  }

}

/* ==================================================
   MOBILE LINEAR STEP CONNECTOR
   ================================================== */

@media (max-width: 899px) {

  #figuroos-configurator-controls {
    position: relative;
  }


  #figuroos-configurator-controls::before {
    content: "";

    position: absolute;

    top: 14px;

    left: calc(100% / 12);
    right: calc(100% / 12);

    height: 2px;

    background-color: #d8d8d8;

    z-index: 0;
  }


  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger {
    z-index: 1;
  }


  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger::before {
    z-index: 2;
  }

}

/* ==================================================
   MOBILE COMPLETED STEP NODES
   ================================================== */

@media (max-width: 899px) {

  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-menu-trigger::before {
    background-color: #7c3aed;
    border-color: #7c3aed;
  }

}

/* ==================================================
   MOBILE COMPLETED STEP CONNECTORS
   ================================================== */

@media (max-width: 899px) {

  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-menu-trigger::after {
    content: "";

    position: absolute;

    top: 13px;
    left: 50%;

    width: calc(100% - 5px);
    height: 2px;

    background-color: #7c3aed;

    z-index: 1;
  }


  /* Step 6 has nowhere further to progress */

  .figuroos-menu-panel[data-step="6"]
  .figuroos-menu-trigger::after {
    display: none;
  }

}

/* ==================================================
   MOBILE STEP ICONS
   ================================================== */

@media (max-width: 899px) {

  #figuroos-step-kit:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/team.svg");
  }


  #figuroos-step-name-number:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/name-number.svg");
  }


  #figuroos-step-photo:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/photo.svg");
  }


  #figuroos-step-skin:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/skin.svg");
  }


  #figuroos-step-boots:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/boots.svg");
  }


  #figuroos-step-card:not(.is-open)
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/card.svg");
  }


  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger::before {
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
  }

}



/* ==================================================
   MOBILE STEP NUMBER POSITION
   Number sits above the existing circular icon.
   ================================================== */

@media (max-width: 899px) {

  .figuroos-menu-panel:not(.is-open)
  .figuroos-step-number {
    position: absolute;

    top: -14px;
    left: 50%;

    transform: translateX(-50%);

    font-size: 10px;
    font-weight: 700;

    color: #777777;

    line-height: 1;

    white-space: nowrap;
  }


  .figuroos-menu-panel:not(.is-open)
  .figuroos-step-label {
    display: block;
  }

}

/* ==================================================
   MOBILE GAP BETWEEN PREVIEW + STEP NAVIGATION
   ================================================== */

@media (max-width: 899px) {

  #figuroos-configurator-controls {
    margin-top: 30px;
  }

}

/* ==================================================
   OPEN STEP
   Restore original header layout
   ================================================== */

.figuroos-menu-panel.is-open
.figuroos-step-number {
  display: none;
}


.figuroos-menu-panel.is-open
.figuroos-step-label {
  display: block;
}

/* ==================================================
   MOBILE GAP BELOW OPEN STEP
   ================================================== */

@media (max-width: 899px) {

  .figuroos-menu-panel.is-open {
    margin-bottom: 18px;
  }

}

/* ==================================================
   INITIAL JOURNEY
   Closed navigation remains visible but subdued
   until all six steps are complete.
   ================================================== */

@media (max-width: 899px) {

  #figuroos-configurator-controls
  .figuroos-menu-panel:not(.is-open)
  .figuroos-menu-trigger {
    opacity: 0.35;
  }


  /* The next required step remains visible */

  #figuroos-configurator-controls
  .figuroos-menu-panel:not(.is-complete):first-of-type
  .figuroos-menu-trigger {
    opacity: 1;
  }


  /* Once ALL SIX steps are complete,
     restore the complete navigation */

  #figuroos-configurator-controls:has(
    #figuroos-step-kit.is-complete
  ):has(
    #figuroos-step-name-number.is-complete
  ):has(
    #figuroos-step-photo.is-complete
  ):has(
    #figuroos-step-skin.is-complete
  ):has(
    #figuroos-step-boots.is-complete
  ):has(
    #figuroos-step-card.is-complete
  )
  .figuroos-menu-panel
  .figuroos-menu-trigger {
    opacity: 1;
  }

}

/* ==================================================
   INITIAL JOURNEY
   COMPLETED STEP VISUAL
   ================================================== */

@media (max-width: 899px) {

  /* Completed steps remain visually complete,
     even though re-entry stays locked until
     the initial 1 → 6 journey is finished. */

  #figuroos-configurator-controls
  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-menu-trigger {
    opacity: 1;
  }


  #figuroos-configurator-controls
  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-menu-trigger::before {
    background-color: #7c3aed;
    border-color: #7c3aed;
  }


  #figuroos-configurator-controls
  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-step-number,
  #figuroos-configurator-controls
  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-step-label {
    color: #7c3aed;
  }

}

/* ==================================================
   DESKTOP STEP NAVIGATION
   Matches approved desktop visual
   ================================================== */

@media (min-width: 900px) {

  /* --------------------------------------------------
     CONTROLS COLUMN
     -------------------------------------------------- */

  #figuroos-configurator-controls {
    align-self: start;
    align-content: start;
  }


  /* --------------------------------------------------
     STEP CARDS
     -------------------------------------------------- */

  .figuroos-configurator-step {
    min-height: 0;

    background: #ffffff;

    border: 1px solid #dddddd;
    border-radius: 8px;

    overflow: hidden;
  }


  /* --------------------------------------------------
     SHARED HEADER â€” ALL SIX STEPS
     -------------------------------------------------- */

  .figuroos-menu-trigger,
  .figuroos-menu-panel.is-open
  .figuroos-menu-trigger {

    position: relative;

    display: grid;

    grid-template-columns:
      54px
      minmax(0, 1fr)
      auto;

    grid-template-rows:
      auto
      auto;

    column-gap: 16px;

    width: 100%;
    min-height: 86px;

    padding: 12px 18px;

    align-items: center;

    text-align: left;
  }


  /* --------------------------------------------------
     CIRCULAR STEP ICON
     -------------------------------------------------- */

  .figuroos-menu-trigger::before,
  .figuroos-menu-panel.is-open
  .figuroos-menu-trigger::before {

    content: "";

    position: static;

    grid-column: 1;
    grid-row: 1 / 3;

    width: 48px;
    height: 48px;

    border: 2px solid #b987ff;
    border-radius: 50%;

    background-color: #ffffff;

    background-repeat: no-repeat;
    background-position: center;
    background-size: 23px 23px;

    box-sizing: border-box;
  }


  /* --------------------------------------------------
     STEP ICON ASSETS
     -------------------------------------------------- */

  #figuroos-step-kit
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/team.svg");
  }

  #figuroos-step-name-number
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/name-number.svg");
  }

  #figuroos-step-photo
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/photo.svg");
  }

  #figuroos-step-skin
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/skin.svg");
  }

  #figuroos-step-boots
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/boots.svg");
  }

  #figuroos-step-card
  .figuroos-menu-trigger::before {
    background-image:
      url("../assets/configurator styling assets/step icons/card.svg");
  }


  /* --------------------------------------------------
     STEP NUMBER
     -------------------------------------------------- */

  .figuroos-step-number,
  .figuroos-menu-panel.is-open
  .figuroos-step-number {

    display: block;

    grid-column: 2;
    grid-row: 1;

    align-self: end;

    margin: 0 0 4px 0;

    color: #a77ae8;

    font-size: 11px;
    font-weight: 700;

    line-height: 1;
  }


  /* --------------------------------------------------
     STEP LABEL
     -------------------------------------------------- */

  .figuroos-step-label,
  .figuroos-menu-panel.is-open
  .figuroos-step-label {

    display: block;

    grid-column: 2;
    grid-row: 2;

    align-self: start;

    color: #222222;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.2;
  }


  /* --------------------------------------------------
     FUTURE STEPS
     -------------------------------------------------- */

  .figuroos-menu-panel:not(.is-complete):not(.is-open)
  .figuroos-menu-trigger {

    opacity: 0.48;
  }


  /* --------------------------------------------------
     COMPLETED STEPS
     -------------------------------------------------- */

  .figuroos-menu-panel.is-complete:not(.is-open)
  .figuroos-menu-trigger {

    opacity: 1;
  }


  /* --------------------------------------------------
     CURRENT / OPEN CARD
     -------------------------------------------------- */

  .figuroos-menu-panel.is-open {

    background: #f3eaff;

    border: 2px solid #a46cff;

    box-shadow:
      inset 5px 0 0 #7c3aed;
  }


  .figuroos-menu-panel.is-open
  .figuroos-menu-trigger {

    opacity: 1;
  }


  /* --------------------------------------------------
     NEXT STEP
     -------------------------------------------------- */

  .figuroos-menu-panel.is-open
  .figuroos-next-step {

    grid-column: 3;
    grid-row: 1 / 3;

    align-self: center;
    justify-self: end;

    padding: 9px 12px;

    background: #ffd84d;

    border: 1px solid #ffd84d;
    border-radius: 7px;

    color: #000000;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
  }


  /* --------------------------------------------------
     OPEN STEP CONTENT

     Content sits BELOW the shared header.
     It does not alter header geometry.
     -------------------------------------------------- */

  .figuroos-menu-panel.is-open
  .figuroos-menu-content {

    padding:
      10px
      24px
      20px
      70px;
  }

}