/* topup-product.css v4.0 */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
  position: relative;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap .gam-product-meta-labels--loop {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap .gam-product-label {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap .gam-product-label-brand {
  color: rgba(255, 198, 96, 0.95);
  border-color: rgba(255, 198, 96, 0.24);
}

.woocommerce ul.products li.product .ast-woo-product-category {
  display: none !important;
}


.gam-topup-wrap {
  margin: 20px 0;
  font-size: 14px;
}

/* ============================================================
   NOTICE
   ============================================================ */
.gam-topup-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(249, 168, 37, 0.08);
  border: 1px solid rgba(249, 168, 37, 0.4);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #f9a825;
  line-height: 1.5;
}
.gam-topup-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ============================================================
   SECTION — wrapper chung cho mỗi khối
   ============================================================ */
.gam-topup-section {
  background: #16213e;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.gam-topup-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #707090;
  margin-bottom: 14px;
}

.gam-req-star {
  color: #ef5350;
  margin-left: 2px;
}

/* ============================================================
   PACK GRID
   ============================================================ */
.gam-topup-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gam-topup-pack {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 12px 14px;
  border: 1.5px solid #2a2a4a;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  background: #1a1a2e;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  box-sizing: border-box;
}

.gam-topup-pack:hover {
  border-color: #00b4d8;
  transform: translateY(-1px);
}

.gam-topup-pack.active {
  border-color: #00b4d8;
  background: rgba(0, 180, 216, 0.07);
  box-shadow: 0 0 0 1px rgba(0, 180, 216, 0.15);
}

.gam-pack-img {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
}

.gam-pack-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.gam-pack-img--empty {
  color: #707090;
  font-size: 24px;
}

.gam-pack-placeholder-icon {
  line-height: 1;
}

.gam-pack-info {
  flex: 1;
  min-width: 0;
  padding-right: 28px;
}

.gam-pack-name {
  font-size: 14px;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
}

.gam-pack-price {
  font-size: 13px;
  font-weight: 800;
  color: #e8b86d;
  line-height: 1.2;
}

.gam-pack-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00b4d8;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.15s,
    transform 0.15s;
}

.gam-topup-pack.active .gam-pack-check {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   FIELD GROUP / FIELDS
   ============================================================ */
.gam-topup-field-group + .gam-topup-field-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2a2a4a;
}

.gam-topup-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #a0a0b0;
  margin-bottom: 12px;
}

.gam-topup-field {
  margin-bottom: 12px;
}
.gam-topup-field:last-child {
  margin-bottom: 0;
}

.gam-topup-field label {
  display: block;
  font-size: 12px;
  color: #a0a0b0;
  margin-bottom: 5px;
}

.gam-topup-field input[type='text'],
.gam-topup-field input[type='password'],
.gam-topup-field select,
.gam-topup-field textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  color: #e0e0e0;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.gam-topup-field input:focus,
.gam-topup-field select:focus,
.gam-topup-field textarea:focus {
  border-color: #00b4d8;
}
.gam-topup-field textarea {
  resize: vertical;
  min-height: 72px;
}
.gam-topup-field select option {
  background: #1a1a2e;
}

/* Password toggle */
.gam-pass-input-wrap {
  position: relative;
}
.gam-pass-input-wrap input {
  padding-right: 42px;
}
.gam-topup-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #707090;
  padding: 4px;
  display: flex;
  align-items: center;
}
.gam-topup-eye:hover,
.gam-topup-eye.active {
  color: #00b4d8;
}

/* Upload */
.gam-topup-upload-wrap {
  margin-top: 8px;
}
.gam-topup-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px dashed #2a2a4a;
  border-radius: 6px;
  font-size: 12px;
  color: #707090;
  cursor: pointer;
  transition: all 0.15s;
}
.gam-topup-upload-btn:hover {
  border-color: #00b4d8;
  color: #00b4d8;
}
.gam-topup-file-input {
  display: none;
}
.gam-topup-upload-preview {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}
.gam-topup-upload-preview img {
  max-width: 100px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #2a2a4a;
}
.gam-topup-upload-remove {
  background: #ef5350;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Field error */
.gam-topup-field-error {
  font-size: 12px;
  color: #ef5350;
  margin-top: 4px;
}

/* ============================================================
   NÚT MUA HÀNG
   ============================================================ */
#gam-topup-action {
  margin-top: 4px;
}

.gam-topup-btn-submit {
  width: 100%;
  padding: 14px 20px;
  background: #00b4d8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    opacity 0.15s;
  letter-spacing: 0.3px;
}
.gam-topup-btn-submit:hover:not(:disabled) {
  background: #0097b5;
}
.gam-topup-btn-submit:disabled {
  background: #2a2a4a;
  color: #707090;
  cursor: not-allowed;
}

.gam-topup-btn-hint {
  font-size: 12px;
  color: #707090;
  text-align: center;
  margin: 8px 0 0;
  padding: 0;
}

/* Global error */
.gam-topup-error-global {
  padding: 10px 14px;
  margin-bottom: 10px;
  background: rgba(239, 83, 80, 0.08);
  border: 1px solid rgba(239, 83, 80, 0.4);
  border-radius: 6px;
  font-size: 13px;
  color: #ef5350;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .gam-topup-packs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gam-topup-pack {
    min-height: 100px;
    padding: 12px;
    gap: 12px;
  }

  .gam-pack-img {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
  }

  .gam-pack-name {
    font-size: 13px;
  }

  .gam-pack-price {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .gam-topup-packs {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gam-topup-section {
    padding: 12px 14px;
  }

  .gam-topup-pack {
    min-height: 92px;
    padding: 10px 12px;
    gap: 12px;
  }

  .gam-pack-img {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
    border-radius: 7px;
  }

  .gam-pack-img img {
    border-radius: 7px;
  }

  .gam-pack-info {
    padding-right: 24px;
  }

  .gam-pack-name {
    font-size: 13px;
    line-height: 1.35;
  }

  .gam-pack-price {
    font-size: 17px;
  }

  .gam-pack-check {
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}