/* ============================================
   GoCheckin Rewards – Gift Cards Page
   ============================================ */

#page-giftcards {
  background: var(--color-surface, #f3f0f4);
}

/* ---- Background gradient mesh ---- */
.gc-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: 44px;
}
.gc-bg::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(198, 122, 255, 0.5) 0%, transparent 65%);
  border-radius: 50%;
}
.gc-bg::after {
  content: '';
  position: absolute;
  top: -30px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255, 170, 240, 0.45) 0%, transparent 65%);
  border-radius: 50%;
}

/* ---- Header ---- */
.gc-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-4) var(--space-4);
  flex-shrink: 0;
}
.gc-title {
  font-size: var(--font-size-xl, 28px);
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 40px;
}
.gc-notif-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow:
    0px 1px 2px 0px rgba(140, 140, 140, 0.1),
    inset 0px 1px 2px 0px rgba(255, 255, 255, 0.5),
    inset 0px 16px 16px 0px rgba(123, 113, 130, 0.1);
  flex-shrink: 0;
}
.gc-notif-btn .icon { width: 20px; height: 20px; color: var(--color-content-main); }

/* ---- Scrollable body ---- */
.gc-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px;
}
.gc-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   CAROUSEL — only the photo strip scrolls horizontally
   Card width = 326px (matches Figma), left-aligned at 16px
   Next card peeks ~36px from the right edge
   ============================================================ */
.gc-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;  /* snap point aligns to 16px padding */
  scrollbar-width: none;
  padding: 4px 16px 0;        /* 16px left = same as page padding */
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}
.gc-carousel::-webkit-scrollbar { display: none; }
.gc-carousel.dragging { cursor: grabbing; scroll-snap-type: none; }

/* ---- Single photo card (top half of the connected unit) ---- */
.gc-photo-card {
  position: relative;
  flex-shrink: 0;
  width: 326px;               /* fixed — matches detail panel */
  height: 204px;
  /* Only top corners are rounded — bottom connects flush to detail panel */
  border-radius: 16px 16px 0 0;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-bottom: none;
  overflow: hidden;
  scroll-snap-align: start;
}

.gc-photo-card-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Gradient fallbacks */
.gc-photo-card--pink   { background: linear-gradient(135deg, #f5c1e0 0%, #f472b6 40%, #e63fa0 100%); }
.gc-photo-card--silver { background: linear-gradient(135deg, #e2e4e8 0%, #b0b5be 50%, #7a8494 100%); }
.gc-photo-card--purple { background: linear-gradient(135deg, #d4aaff 0%, #a855f7 50%, #7c3aed 100%); }

.gc-photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 48%, rgba(0,0,0,0.22) 92%);
}
.gc-photo-card-content {
  position: absolute;
  inset: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.gc-photo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.gc-card-badge {
  background: var(--color-semantic-success, #28a146);
  color: #fcfcfc;
  font-size: 12px;
  font-weight: var(--font-weight-regular, 400);
  line-height: 16px;
  padding: 3px 12px;
  border-radius: 16px;
  white-space: nowrap;
}
.gc-card-badge--hidden { visibility: hidden; }
.gc-card-logo {
  font-size: 12px;
  font-weight: var(--font-weight-bold, 700);
  color: #fff;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.3);
}
.gc-photo-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.gc-card-balance {
  font-size: 20px;
  font-weight: var(--font-weight-semibold, 600);
  color: #fcfcfc;
  line-height: 28px;
}
.gc-card-expiry {
  font-size: 12px;
  color: rgba(252, 252, 252, 0.88);
  line-height: 16px;
}

/* ============================================================
   DETAIL PANEL — white card, bottom half of the connected unit
   Fixed position below carousel, content updates on swipe
   ============================================================ */
.gc-detail-panel {
  /* Same width and left offset as the active card */
  width: 326px;
  margin-left: 16px;
  margin-top: 0;             /* flush — no gap between card and panel */
  background: var(--color-on-primary, #fcfcfc);
  /* Only bottom corners rounded — top connects flush to photo card */
  border-radius: 0 0 16px 16px;
  box-shadow: 0px 4px 12px rgba(113, 113, 113, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

/* QR section */
.gc-qr-section {
  padding: 24px var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gc-qr-img {
  width: 104px; height: 104px;
  flex-shrink: 0;
}
.gc-card-number {
  font-size: 12px;
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-content-main);
  line-height: 16px;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Store info */
.gc-store-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 var(--space-4) var(--space-4);
}
.gc-store-divider {
  width: 32px; height: 1px;
  background: rgba(100, 100, 108, 0.25);
}
.gc-store-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: center;
}
.gc-store-name {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 24px;
}
.gc-store-address {
  font-size: 12px;
  color: var(--color-content-main);
  line-height: 16px;
  opacity: 0.7;
}

/* Action row */
.gc-actions {
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(100, 100, 108, 0.1);
}
.gc-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--space-4) var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 16px;
  white-space: nowrap;
  transition: background 0.15s;
}
.gc-action:hover { background: rgba(0,0,0,0.03); }
.gc-action + .gc-action { border-left: 1px solid rgba(100, 100, 108, 0.1); }
.gc-action .icon { width: 24px; height: 24px; color: var(--color-content-main); }
.gc-action--active,
.gc-action--active .icon { color: var(--color-primary, #a528e3); }

/* ---- Dots — below detail panel, above Add Card ---- */
.gc-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px var(--space-4) 0;
  flex-shrink: 0;
}
.gc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-content-main, #222226);
  opacity: 0.2;
  transition: opacity 0.2s, width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.gc-dot.active {
  width: 16px;
  border-radius: 4px;
  background: var(--color-primary, #a528e3);
  opacity: 1;
}

/* ---- Floating Add Card button ---- */
.gc-add-card-wrap {
  position: absolute;
  bottom: calc(76px + var(--space-4));
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.btn-add-card {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary, #a528e3);
  color: #fcfcfc;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px var(--space-6) 8px 20px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  box-shadow: 0px 4px 12px rgba(165, 40, 227, 0.35);
  transition: opacity 0.15s;
}
.btn-add-card:hover { opacity: 0.9; }
.btn-add-card .icon { width: 20px; height: 20px; color: #fcfcfc; }

/* ---- Manage Cards bottom sheet ---- */
.gc-manage-backdrop {
  position: absolute;
  inset: 0;
  z-index: 31;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 44px;
}

.gc-manage-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.gc-manage-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 32;
  background: var(--color-surface, #f3f0f4);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  padding: var(--space-2) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.gc-manage-sheet.open {
  transform: translateY(0);
}

.gc-manage-indicator {
  width: 40px;
  height: 4px;
  border-radius: 9999px;
  background: var(--color-content-main);
  opacity: 0.2;
  margin-bottom: var(--space-5);
}

.gc-manage-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 26px;
  text-align: center;
  margin-bottom: var(--space-5);
}

.gc-manage-list {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.gc-manage-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: 0 var(--space-5);
  border: none;
  background: none;
  font-family: var(--font-family);
  cursor: pointer;
  border-top: 1px solid var(--color-border-weak);
  transition: var(--transition-fade);
}

.gc-manage-item:hover { opacity: 0.75; }

.gc-manage-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-content-main);
}

.gc-manage-item span {
  flex: 1;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-weak);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-m);
  text-align: left;
}

.gc-manage-home-bar {
  width: 135px;
  height: 5px;
  background: var(--color-content-main);
  border-radius: 100px;
  opacity: 0.3;
  margin: var(--space-3) 0;
}
