/* =========================================
   CUSTOMER VARIANT MODAL
========================================= */

body.modal-open {
  overflow: hidden;
}

.customer-variant-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;

  display: none;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100dvh;

  padding: 20px;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);

  box-sizing: border-box;
}

.customer-variant-modal.show {
  display: flex;
}

.customer-variant-dialog {
  position: relative;

  width: min(620px, 100%);
  max-height: 88vh;

  overflow-y: auto;

  padding: 30px;

  background: #ffffff;

  border-radius: 24px;

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.25);

  box-sizing: border-box;
}

.customer-variant-close {
  position: absolute;
  top: 16px;
  right: 18px;

  width: 42px;
  height: 42px;

  border: none;
  border-radius: 50%;

  background: #f5f5f5;

  font-size: 26px;
  line-height: 1;

  cursor: pointer;
}

.customer-variant-close:hover {
  background: #ffe5ef;
}

.customer-variant-heading {
  padding-right: 48px;
  margin-bottom: 22px;
}

.customer-variant-eyebrow {
  display: inline-block;

  margin-bottom: 6px;

  color: #ff5f9e;

  font-weight: 600;
}

.customer-variant-heading h2 {
  margin: 0 0 6px;

  font-size: 24px;
}

.customer-variant-heading p {
  margin: 0;

  color: #777;
}

.customer-variant-list {
  display: grid;
  gap: 12px;
}


/* =========================================
   VARIANT ITEM
========================================= */

.customer-variant-option {
  width: 100%;

  display: grid;

  grid-template-columns:
    78px
    minmax(0, 1fr)
    36px;

  align-items: center;

  gap: 16px;

  padding: 12px;

  text-align: left;

  background: #ffffff;

  border: 2px solid #eeeeee;

  border-radius: 18px;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.customer-variant-option:hover:not(:disabled) {
  border-color: #ff9ac2;

  transform: translateY(-1px);
}

.customer-variant-option.selected {
  border-color: #ff5f9e;

  background: #fff4f8;
}

.customer-variant-option.is-out {
  opacity: 0.5;

  cursor: not-allowed;
}

.customer-variant-option img {
  width: 78px;
  height: 78px;

  object-fit: cover;

  border-radius: 14px;

  background: #f7f7f7;
}

.customer-variant-option-info {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 4px;
}

.customer-variant-option-info strong {
  font-size: 16px;
}

.customer-variant-option-info small {
  color: #777;
}

.customer-variant-price {
  color: #ff5f9e;

  font-size: 16px;
  font-weight: 700;
}

.customer-variant-check {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #eeeeee;

  color: transparent;
}

.customer-variant-option.selected
.customer-variant-check {
  background: #ff5f9e;

  color: #ffffff;
}


/* =========================================
   QUANTITY
========================================= */

.customer-variant-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin: 24px 0 18px;

  padding-top: 18px;

  border-top: 1px solid #eeeeee;
}

.customer-variant-qty > span {
  font-weight: 600;
}

.customer-variant-qty-control {
  display: flex;
  align-items: center;

  overflow: hidden;

  border: 1px solid #dddddd;

  border-radius: 12px;
}

.customer-variant-qty-control button {
  width: 42px;
  height: 42px;

  border: none;

  background: #f7f7f7;

  font-size: 19px;

  cursor: pointer;
}

.customer-variant-qty-control input {
  width: 60px;
  height: 42px;

  padding: 0;

  text-align: center;

  border: none;
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;

  outline: none;

  font-family: inherit;
}

.customer-variant-submit {
  width: 100%;

  min-height: 50px;
}

.customer-variant-submit:disabled {
  opacity: 0.55;

  cursor: not-allowed;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

  .customer-variant-modal {
    align-items: flex-end;

    padding: 0;
  }

  .customer-variant-dialog {
    width: 100%;

    max-height: 88dvh;

    padding: 24px 18px;

    border-radius:
      24px
      24px
      0
      0;
  }

  .customer-variant-heading h2 {
    font-size: 21px;
  }

  .customer-variant-option {
    grid-template-columns:
      68px
      minmax(0, 1fr)
      30px;

    gap: 12px;
  }

  .customer-variant-option img {
    width: 68px;
    height: 68px;
  }

  .customer-variant-qty {
    position: sticky;
    bottom: 0;

    background: #ffffff;
  }
}