/* Rewards module styles - main/loyalty/assets/css/rewards.css */
:root{
  --rr-bg: #0d0d0d;
  --rr-pink: #E899F2;
  --rr-cyan: #9BE2F2;
  --rr-text: #f6f6f6;
  --rr-muted: rgba(255,255,255,0.55);
  --rr-radius: 12px;
}

.rewards-section{ background: linear-gradient(180deg, rgba(13,13,13,0.6), rgba(13,13,13,0.9)); color:var(--rr-text); padding:18px; border-radius:12px; box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
.rewards-header{ display:flex; gap:18px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.rewards-title h2{ margin:0 0 6px 0; font-size:1.3rem; color:var(--rr-pink); }
.rewards-sub{ margin:0; color:var(--rr-muted); font-size:0.92rem; }

.rewards-progress{ min-width:220px; max-width:420px; }
.rewards-progress .points{ font-size:1.6rem; color:var(--rr-cyan); /* font-weight controlled by global-font.css */ }
.rewards-progress .next-reward{ font-size:0.9rem; color:var(--rr-muted); margin-top:6px; }
.progress-bar-outer{ margin-top:10px; background:linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border-radius:999px; height:12px; overflow:hidden; }
.progress-bar-inner{ height:100%; background:linear-gradient(90deg,var(--rr-cyan),var(--rr-pink)); width:0%; transition:width 800ms cubic-bezier(.2,.8,.2,1); box-shadow:0 6px 18px rgba(233,153,242,0.12) inset; }

.rewards-controls{ display:flex; gap:8px; margin:12px 0 16px 0; flex-wrap:wrap; }

/* Channel button styles for redemption modal */
.channel-btn{
  padding:12px 14px;border-radius:10px;border:1px solid rgba(0,0,0,0.06);background:#f2f2f2;color:#111;cursor:pointer;min-width:160px;text-align:left;font-size:14px;display:flex;flex-direction:column;gap:6px}
.channel-btn:focus{outline:3px solid rgba(233,153,242,0.18)}
.channel-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,0.06)}

/* neon accents */
.channel-btn[aria-label*="In\u2011Store"]{box-shadow:0 6px 20px rgba(233,153,242,0.07),0 0 18px rgba(233,153,242,0.06)}
.channel-btn[aria-label*="Online"]{box-shadow:0 6px 20px rgba(155,226,242,0.07),0 0 14px rgba(155,226,242,0.06)}

/* Reservation confirmation */
.progress-bar-outer{height:8px;background:rgba(255,255,255,0.03);border-radius:8px;overflow:hidden}
.progress-bar-inner{height:100%;background:linear-gradient(90deg,#9BE2F2,#E899F2);width:100%;transition:width 0.5s linear}

/* modal micro adjustments for accessibility */
.rewards-modal { max-width:520px }
.rewards-modal button.btn-ghost, .rewards-modal button.btn-redeem { cursor:pointer }
.rewards-modal [role="button"]:focus{outline:2px solid rgba(155,226,242,0.22)}
.filter-btn{ background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--rr-text); padding:8px 12px; border-radius:999px; cursor:pointer; /* font-weight controlled by global-font.css */ }
.filter-btn.active{ border-color:var(--rr-pink); box-shadow:0 4px 20px rgba(233,153,242,0.12); color:var(--rr-pink); }

.rewards-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }

/* Center actions inside reward tiles so the Details button is prominent */
.reward-tile .tile-actions{ display:flex; justify-content:center; align-items:center; padding:12px; }
.reward-tile .tile-actions .btn-redeem{ min-width:110px; }
.reward-tile{ background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:var(--rr-radius); padding:12px; position:relative; overflow:hidden; min-height:150px; display:flex; flex-direction:column; justify-content:space-between; transition:transform 200ms ease, box-shadow 200ms ease; }
.reward-tile:hover{ transform:translateY(-6px); }

.reward-top{ display:flex; gap:12px; align-items:center; }
.reward-icon{ width:56px; height:56px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }
.reward-name{ /* font-weight controlled by global-font.css */ font-size:1rem; color:var(--rr-text); }
.reward-points{ color:var(--rr-muted); font-size:0.9rem; }

.tile-meta{ margin-top:10px; }
.tile-progress{ height:8px; background:rgba(255,255,255,0.04); border-radius:999px; overflow:hidden; }
.tile-progress-inner{ height:100%; width:0%; background:linear-gradient(90deg,var(--rr-cyan),var(--rr-pink)); transition:width 900ms cubic-bezier(.2,.8,.2,1); }

.tile-actions{ display:flex; gap:8px; align-items:center; margin-top:10px; }
.btn-redeem{ background:linear-gradient(180deg,var(--rr-pink),var(--rr-cyan)); color:var(--rr-bg); border:none; padding:8px 12px; border-radius:8px; cursor:pointer; /* font-weight controlled by global-font.css */ box-shadow:0 8px 30px rgba(155,226,242,0.08); }
.btn-redeem[disabled]{ opacity:0.5; cursor:not-allowed; filter:grayscale(0.2); }

/* Locked state overlay */
/* Support locked styling when the .locked class is on a parent or on the tile itself. */
.locked .reward-tile,
.reward-tile.locked{
  opacity:0.6;
}
.locked .reward-tile::after,
.reward-tile.locked::after{
  content:''; position:absolute; inset:0; background:linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)); pointer-events:none;
}
/* Keep a static, non-animated overlay for any existing .shimmer element, but
   prefer not creating one in JS. */
.locked .shimmer,
.reward-tile.locked .shimmer{
  position:absolute; inset:0; background: linear-gradient(120deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.02) 100%); pointer-events:none; mix-blend-mode:overlay; opacity:0.6; animation:none; transform:none;
}
/* remove the shimmer keyframes/animation to avoid the moving bar effect */
@keyframes shimmer{ }

/* Tier glows */
.tier-bronze .reward-icon{ box-shadow:0 8px 24px rgba(255,165,0,0.08); border:1px solid rgba(255,165,0,0.08);} 
.tier-silver .reward-icon{ box-shadow:0 8px 24px rgba(66,135,245,0.06); border:1px solid rgba(66,135,245,0.06);} 
.tier-gold .reward-icon{ box-shadow:0 12px 28px rgba(212,175,55,0.08); border:1px solid rgba(212,175,55,0.06);} 

.reward-tile.available{ box-shadow: 0 10px 30px rgba(233,153,242,0.06); border:1px solid rgba(233,153,242,0.06); }
.reward-tile.available:hover{ box-shadow: 0 18px 48px rgba(233,153,242,0.12); }

/* Redeemed visual: green outline/glow */
.reward-tile.redeemed{ border:1px solid rgba(40,200,120,0.12); box-shadow:0 10px 30px rgba(40,200,120,0.06); }
.reward-tile.redeemed .reward-icon{ box-shadow:0 12px 30px rgba(40,200,120,0.06); border:1px solid rgba(40,200,120,0.08); }
.redeemed-badge{ display:inline-block; margin-left:8px; background:rgba(40,200,120,0.12); color:rgba(40,200,120,0.95); /* font-weight controlled by global-font.css */ padding:2px 6px; border-radius:999px; font-size:0.8rem; vertical-align:middle; }

.rewards-foot{ margin-top:12px; color:var(--rr-muted); font-size:0.9rem; }

/* Mobile adjustments */
@media (max-width:640px){
  .rewards-header{ flex-direction:column; align-items:flex-start; }
  .rewards-progress{ width:100%; }
}

/* Modal styling for rewards */
.rr-modal-wrap{ position:fixed; inset:0; z-index:2000; display:flex; align-items:center; justify-content:center; }
.rr-modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,0.6); }
.rr-modal-dialog{ position:relative; z-index:2010; max-width:520px; width:92%; padding:18px; border-radius:12px; background:linear-gradient(180deg,#0d0d0d,#111); color:var(--rr-text); box-shadow:0 20px 60px rgba(0,0,0,0.6); }
.rr-modal-dialog .rewards-modal h3{ margin-top:0; color:var(--rr-pink); }
.rr-modal-dialog .rewards-modal p.muted{ color:var(--rr-muted); }
.btn-ghost{ background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--rr-text); padding:8px 12px; border-radius:8px; cursor:pointer; }


/* =========================================================
   PHASE 3: Punch Cards Tab System
   ========================================================= */

/* Tab Navigation */
.rewards-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2px;
}

.rewards-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  top: 2px;
}

.rewards-tab svg {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.rewards-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.03);
}

.rewards-tab:hover svg {
  opacity: 0.9;
}

.rewards-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.rewards-tab.active svg {
  opacity: 1;
}

/* Panel containers */
.rewards-panel {
  animation: fadeIn 0.3s ease;
}

.rewards-panel.no-tabs {
  /* When feature flag disabled, no spacing needed */
}

/* Punch Cards Grid */
.punch-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .punch-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Punch Card Tile */
.punch-card-tile {
  background: linear-gradient(135deg, rgba(155, 226, 242, 0.1), rgba(232, 153, 242, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.punch-card-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(155, 226, 242, 0.3);
}

.punch-card-tile.completed {
  border-color: rgba(74, 222, 128, 0.5);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 197, 94, 0.15));
}

.punch-card-tile.redeemed {
  opacity: 0.6;
  cursor: default;
}

.punch-card-tile.redeemed:hover {
  transform: none;
  box-shadow: none;
}

/* Punch Card Header */
.punch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.punch-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.punch-card-status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.punch-card-status.active {
  background: rgba(155, 226, 242, 0.2);
  color: var(--cyan);
}

.punch-card-status.completed {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.punch-card-status.redeemed {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* Punch Card Description */
.punch-card-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

/* Punch Card Progress */
.punch-card-progress {
  margin: 16px 0;
}

.punch-card-stamps {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stamps-current {
  font-size: 1.5rem;
  color: var(--cyan);
}

.stamps-separator {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.3);
}

.stamps-max {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
}

.stamps-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 4px;
  font-weight: 400;
}

/* Punch Card Progress Bar */
.punch-card-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.punch-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.punch-card-tile.completed .punch-card-progress-fill {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

/* Punch Card Reward */
.punch-card-reward {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  color: var(--pink);
  font-weight: 500;
}

.punch-card-reward svg {
  flex-shrink: 0;
}

/* Empty State */
.punch-cards-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.punch-cards-empty svg {
  margin-bottom: 20px;
}

.punch-cards-empty p {
  font-size: 1.1rem;
  margin: 0 0 8px 0;
  color: rgba(255, 255, 255, 0.7);
}

.punch-cards-empty small {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.retry-btn {
  margin-top: 16px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.retry-btn:hover {
  transform: scale(1.05);
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive */
@media (max-width: 600px) {
  .rewards-tabs {
    gap: 4px;
  }
  
  .rewards-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .rewards-tab svg {
    width: 16px;
    height: 16px;
  }
  
  .punch-card-tile {
    padding: 16px;
  }
  
  .punch-card-name {
    font-size: 1rem;
  }
}
