/*
==============================================
  GLOBAL ONBOARDING STYLES
==============================================
*/
html,
body {
  height: 100%;
}
#onboarding-container {
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background-color: #231f20;
}
.onboarding-step {
  display: none;
  width: 100%;
  height: 100%;
  padding: 0;
  flex-direction: column;
}
.onboarding-step.active-step {
  display: flex;
}

.onboarding-step:not(#step-1) .step-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.onboarding-title {
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: clamp(10px, 2dvh, 20px);
  flex-shrink: 0;
  color: #444141;
  line-height: 2rem;
}
.onboarding-main-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}

/*
==============================================
  NAVIGATION (Chevron Buttons)
==============================================
*/
.step-navigation {
  flex-shrink: 0;
}
.chevron-btn {
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.3s,
    border-color 0.3s;
  padding: 0;
  z-index: 1000;
}

.chevron-btn path {
  stroke: #444141;
  transition: stroke 0.3s;
}
.chevron-btn:hover {
  background-color: #444141;
}
.chevron-btn:hover path {
  stroke: white;
}
#step-1 .chevron-btn.beggin {
  background-color: #444141;
  border: none;
  flex-shrink: 0;
}
#step-1 .chevron-btn.beggin path {
  stroke: white;
}
#step-1 .chevron-btn.beggin:hover {
  background-color: white;
}
#step-1 .chevron-btn.beggin:hover path {
  stroke: #444141;
}
.chevron-btn.back-button {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}
.chevron-btn.next-button:not(.beggin) {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

/*
==============================================
  STEP 1: INTRO SCREEN
==============================================
*/
#step-1.onboarding-step {
  flex-direction: row;
  background-color: #231f20;
}
#step-1 .left {
  background-color: #231f20;
  color: white;
  width: 50%;
  padding: 6dvh 60px;
  display: flex;
  flex-direction: column;
}
#step-1 .left .logo {
  display: none;
}
#step-1 .step-1-main-content {
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
#step-1 .step-1-section {
  width: 80%;
  max-width: 500px;
  margin: 0 auto clamp(15px, 3dvh, 30px) auto;
  text-align: left;
}
#step-1 .step-1-section:last-of-type {
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#step-1 h2 {
  color: white;
  font-size: clamp(1rem, 2.5dvh, 1.5rem);
  margin-bottom: 1dvh;
}
#step-1 p {
  font-size: clamp(0.9rem, 2dvh, 1.1rem);
  line-height: 1.2;
  color: #d1d0d0;
  margin: 0;
}
#step-1 b {
  color: white;
}
#step-1 span {
  color: #ee4036;
}
#step-1 .right {
  width: 50%;
  background: url("https://nosmoke.ba/wp-content/uploads/2025/06/view-1.webp")
    center/cover no-repeat;
}

/*
==============================================
  STEPS 2, 3, 4: PRODUCT/CARD SELECTION
==============================================
*/
.onboarding-step:not(#step-1) {
  background: url("https://nosmoke.ba/wp-content/uploads/2025/06/onboarding-background.webp")
    center center / 100% 100% no-repeat;
}
.onboarding-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 0;
}
.onboarding-card {
  border: 3px solid transparent;
  border-radius: 10px;
  transition: border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  max-width: 500px;
}
.onboarding-card:hover {
  border-color: #aaa;
}
.onboarding-card.selected {
  border-color: transparent;
}
.onboarding-card.selected:hover {
  border-color: transparent;
}
.product-image-wrapper {
  height: 55dvh;
  max-height: 600px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#step-3 .onboarding-card img,
#step-4 .onboarding-card img {
  mix-blend-mode: multiply;
}
.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.product-name {
  font-size: clamp(1.4rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: #9f9d9c;
  white-space: normal;
  margin-bottom: 0.5rem;
}
.product-price span {
  background: red;
  color: white;
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: 800;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
}
.color-swatches-wrapper {
  margin-top: 4dvh;
}
.color-swatches-wrapper,
.liquid-select-wrapper {
  flex-shrink: 0;
  margin-bottom: 40px;
}
.liquid-select-wrapper {
  max-width: 90%;
  width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.color-swatches {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s ease;
}
.color-swatch.active {
  border-color: #000;
}
.liquid-select {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 15px;
}
#select2-liquid-product-select-results .select2-results__option {
  font-size: 1.2rem !important;
}

#select2-liquid-variation-select-results .select2-results__option {
  font-size: 1.2rem !important;
}

div.quantity {
  margin-top: 20px;
}
div.quantity .minus, div.quantity .plus {
  height: 3rem !important;
  width: 30px !important;
}

div.quantity .qty {
  height: 3rem !important;
  width: 44px !important;
}
/*
==============================================
  MOBILE & RESPONSIVE STYLES
==============================================
*/
@media (max-width: 992px) {
  .onboarding-step:not(#step-1) .step-content {
    padding: 15px;
  }
  .chevron-btn.back-button,
  .chevron-btn.next-button:not(.beggin) {
    top: auto;
    bottom: 15px;
    transform: translateY(0);
  }
  #step-1 .right {
    display: none;
  }
  #step-1 .left {
    width: 100%;
    padding: 20px;
  }
  #step-1 .left .logo {
    display: block;
    width: 170px;
    align-self: center;
    margin-bottom: 5dvh;
  }
  #step-1 .step-1-section {
    width: 100%;
  }
  #step-1 .step-1-section:last-of-type {
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
    margin-top: 20px;
  }
  #step-1 h2 {
    line-height: 3dvh;
  }
  #step-4 .product-image-wrapper img {
    max-width: 250px;
    max-height: 250px;
  }
  .onboarding-step:not(#step-1) {
    background-image: url("https://nosmoke.ba/wp-content/uploads/2025/07/onboarding-mobile-background-full-scaled.webp");
    background-size: 100% 100%;
  }
  .onboarding-card-wrapper {
    gap: 10px;
  }
  .product-image-wrapper {
    height: 48dvh;
    margin-bottom: 10px;
  }
  .product-image-wrapper img {
    object-fit: cover;
  }

  .onboarding-card.selected img {
    object-fit: contain;
  }

  .liquid-select-wrapper {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .color-swatches {
    flex-wrap: wrap;
    gap: 6px;
  }

  .color-swatch {
    width: 30px;
    height: 30px;
  }
}

@media (max-height: 680px) and (max-width: 992px) {
  #step-1 .left .logo {
    width: 120px;
    margin-bottom: 5dvh;
  }
  #step-1 h2 {
    font-size: clamp(1rem, 2.2dvh, 1.2rem);
  }
  #step-1 p {
    font-size: clamp(0.8rem, 1.9dvh, 1rem);
    line-height: 1.3;
  }
  #step-1 .step-1-section {
    margin-bottom: clamp(10px, 2dvh, 20px);
  }
  .product-image-wrapper {
    height: 38dvh;
  }
  .product-info {
    gap: 5px;
  }
  .product-price span {
    padding: 5px 10px;
  }
  .onboarding-title {
    margin-bottom: 10px;
  }
}

/*
==============================================
  DESKTOP-ONLY ENHANCEMENTS
==============================================
*/
@media (min-width: 993px) {
  /* STEP 1 ENHANCEMENTS */
  #step-1 .step-1-main-content {
    justify-content: space-evenly;
    gap: clamp(70px, 4dvh, 60px);
  }
  #step-1 .step-1-section {
    width: 90%;
    max-width: 550px;
    margin: 0 auto;
  }
  #step-1 h2 {
    font-size: clamp(1.4rem, 1.2vw, 2.2rem);
    line-height: 1.2;
  }
  #step-1 p {
    font-size: clamp(1rem, 1.1vw, 1.4rem);
  }

  /* STEPS 2, 3, 4 ENHANCEMENTS - Vertically center the content */
  .onboarding-step:not(#step-1) .onboarding-main-content {
    justify-content: center;
  }

  /* DESKTOP ASYMMETRICAL LAYOUT FOR STEPS 2 & 4 */
  #step-2 .onboarding-card {
    flex-direction: row;
    align-items: center;
  }
  #step-2 .onboarding-card .product-image-wrapper,
  #step-4 .onboarding-card .product-image-wrapper {
    flex: 0 0 60%;
    margin-bottom: 0;
  }
  #step-2 .onboarding-card .product-info {
    flex: 1;
  }
  #step-2 .onboarding-card:first-child .product-info {
    order: -1;
    align-items: flex-end;
  }
  #step-2 .onboarding-card:last-child .product-info {
    align-items: flex-start;
  }
}

/*
==============================================
  Checkmark SVG before cart redirect
==============================================
*/
#onboarding-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-success-inner {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.4s ease;
}

.onboarding-success-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

.onboarding-success-message {
  font-size: 1.2rem;
  margin-top: 1rem;
  font-weight: 600;
}

/* SVG Checkmark animation */
.checkmark {
  width: 72px;
  height: 72px;
  stroke: #1b9b1b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin: 0 auto;
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.checkmark-circle {
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: dash 0.6s ease-out forwards;
}

.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: dash-check 0.3s 0.6s ease forwards;
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dash-check {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
