/* css/loyalty/giftcard-theme.css */
.giftcard-preview {
  position: relative;
  width: 320px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;

  color: var(--gc-text, white);

  /* ✅ solid background instead of gradient */
  background: var(--gc-primary, #667eea);

  /* ✅ secondary used as border/accent */
  border: 3px solid var(--gc-secondary, #aaa83b);

  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* ✨ Shine effect */
.giftcard-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );
  transform: rotate(25deg);
  pointer-events: none;
}

/* inner layout */
.giftcard-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 16px;
}

/* header */
.giftcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.giftcard-card .row {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 10px;
}

.giftcard-card .col-4 {
  flex: 0 0 auto;
  width: 260px; /* slightly smaller than card */
}

.giftcard-logo img {
  max-height: 40px;
}

.giftcard-title {
  font-weight: bold;
  font-size: 16px;
}

/* amount */
.giftcard-amount {
  text-align: center;
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* details */
.giftcard-details {
  font-size: 12px;
  opacity: 0.9;
}

.giftcard-message {
  margin-top: 5px;
  font-style: italic;
}

/* footer */
.giftcard-footer {
  text-align: center;
}

.barcode {
  width: 100%;
  height: auto;
  background: #fff;     /* MUST be white */
  padding: 8px;         /* creates quiet zone */
  border-radius: 6px;
}

.barcode-label {
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 4px;
}
.barcode svg {
  width: 100% !important;
  height: auto !important;
}
@media print {
  .barcode {
    background: #fff !important;
    padding: 10px !important;
  }
}

/* hover animation (for select cards) */
.giftcard-select:hover .giftcard-shine {
  animation: shine 0.8s forwards;
}

@keyframes shine {
  from { left: -100%; }
  to { left: 100%; }
}


.giftcard-select {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 12px;
}

.giftcard-select:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.giftcard-select.selected {
  border: 3px solid #28a745;
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(40,167,69,0.3);
}


@media print {
  .giftcard-preview {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;

    /* Force background + border */
    background: var(--gc-primary, #667eea) !important;
    border: 3px solid var(--gc-secondary, #aaa83b) !important;
    color: var(--gc-text, #fff) !important;
  }
}
@media print {
  .giftcard-shine {
    display: none !important;
  }
}

@media print {
  #giftcardPrintSection {
    display: block;
  }

  .giftcard-preview {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}