@charset "utf-8";
/* CSS Document */
.gift-modal-dialog {
  max-width: 520px;
  margin: 30px auto;
}

.gift-modal-content {
  border-radius: 14px;
  overflow: hidden;
}

.gift-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 18px;
}

.gift-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gift-step {
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.gift-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeee;
}

.gift-step-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  color: #243042;
  line-height: 1.25;

  /* перенос только названия */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gift-step-min {
  flex-shrink: 0;

  font-size: 14px;
  font-weight: 600;
  color: #0a8f3c;

  /* сумма никогда не переносится */
  white-space: nowrap;

  line-height: 1.25;
}

.gift-step-unlock-message {
  background: #fff3cd;
  color: #856404;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 600;
  text-align: center;
}

.gift-item {
  position: relative;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  text-align: center;
  background: #fff;
}

.gift-item:last-child {
  margin-bottom: 0;
}

.gift-image {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto 10px;
  display: block;
}

.gift-name {
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c2c34;
}

.gift-bottom-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.gift-qty-input {
  width: 70px;
  height: 47px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  background: #f5f5f5;
  color: #222;
  opacity: 1;
}

.gift-qty-input:disabled {
  background: #f5f5f5;
  color: #222;
  opacity: 1;
  cursor: default;
}

.gift-button {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.gift-button-add {
  background: #005bff;
  color: #fff;
}

.gift-button-selected {
  background: #0a8f3c;
  color: #fff;
}

.gift-button-disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

/* Заблокированный уровень: название уровня и товара остаются читаемыми */
.gift-step-locked .gift-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  pointer-events: none;
}

.gift-step-locked .gift-image {
  filter: grayscale(1);
  opacity: 0.8;
}

.gift-step-locked .gift-name,
.gift-step-locked .gift-bottom-row {
  opacity: 1;
  filter: none;
}

@media (max-width: 576px) {
  .gift-modal-dialog {
    margin: 15px;
  }

  .gift-modal-body {
    max-height: 65vh;
  }

  .gift-step-min {
    white-space: normal;
  }
}
    
.gift-button-loading {
  opacity: 0.8;
  cursor: wait;
}

.gift-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: gift-spin 0.7s linear infinite;
}

@keyframes gift-spin {
  to {
    transform: rotate(360deg);
  }
}
    
  .gift-modal-dialog {
  max-width: 900px;
}

.gift-items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gift-item {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .gift-modal-dialog {
    margin: 15px;
    max-width: none;
  }

  .gift-items-grid {
    grid-template-columns: 1fr;
  }
}  

.gift-select-info {
  margin-bottom: 5px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #dde3ea;

  font-size: 15px;
  font-weight: 600;
  color: #243042;

  text-align: center;
}
    
.gift-open-link-premium {
  position: relative;

  display: inline-block;

  padding-bottom: 4px;

  color: #243042;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;

  text-decoration: none !important;

  transition: color 0.2s ease;
}

.gift-open-link-premium::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 2px;

  background: #243042;

  transform: scaleX(1);
  transform-origin: left;

  transition: transform 0.25s ease;
}

.gift-open-link-premium:hover {
  color: #111827;
}

.gift-open-link-premium:hover::after {
  transform: scaleX(0.55);
}

@media (max-width: 576px) {
  .gift-open-link-premium {
    font-size: 16px;
  }
}
.cart-page-locked {
  overflow: hidden;
}

.cart-page-locked * {
  pointer-events: none !important;
}

#cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(255,255,255,0.85);
  display: none;
  align-items: center;
  justify-content: center;
}

#cart-overlay.is-active {
  display: flex;
}

.cart-spinner {
  width: 54px;
  height: 54px;
  border: 6px solid #ddd;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: cartSpin 0.8s linear infinite;
}

@keyframes cartSpin {
  to {
    transform: rotate(360deg);
  }
}
