/* Club de VELOCE rewards panel: frosted silver glass, near-black accents. Scoped under #cdv-root.
   Served from the app (Vercel) so design updates go live without a theme extension release. */
#cdv-root {
  /* Above page content and sticky bars, below the theme's drawers, menus and popups (cart 99, menu 15+, email popups 90000+). */
  --cdv-z: 14;
  --cdv-accent: #161616;
  --cdv-ink: #161616;
  --cdv-ink-2: #4b4b49;
  --cdv-muted: #8a8a86;
  --cdv-faint: rgba(22, 22, 22, .3);
  --cdv-line: rgba(22, 22, 22, .08);
  --cdv-glass: rgba(255, 255, 255, .6);
  --cdv-glass-2: rgba(255, 255, 255, .82);
  --cdv-edge: rgba(255, 255, 255, .9);
  --cdv-good: #23874f;
  --cdv-overlay: transparent;
  --cdv-banner-ink: #161616;
  font-family: 'Aileron', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--cdv-ink); line-height: 1.4; -webkit-font-smoothing: antialiased;
}
#cdv-root *, #cdv-root *::before, #cdv-root *::after { box-sizing: border-box; }
#cdv-root button { font: inherit; cursor: pointer; margin: 0; color: var(--cdv-ink); }
#cdv-root .cdv-dark, #cdv-root .cdv-primary, #cdv-root .cdv-vcard.cdv-metal-2 { color: #fff; }
#cdv-root svg { display: block; flex-shrink: 0; }
#cdv-root a { color: inherit; }
#cdv-root :focus-visible { outline: 2px solid var(--cdv-accent); outline-offset: 2px; }

/* Launcher */
.cdv-launch {
  position: fixed; bottom: calc(24px + var(--cdv-lift, 0px)); z-index: var(--cdv-z); height: 54px; padding: 0 22px 0 8px; border-radius: 27px;
  transition: bottom .25s ease, opacity .15s ease;
  border: 1px solid rgba(255, 255, 255, .18); background: linear-gradient(170deg, #2b2b2b, #0e0e0e);
  color: #fff !important; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .15);
}
/* A drawer, menu or popup is open over the launcher's spot: hide it until that closes. */
#cdv-root.cdv-covered .cdv-launch { opacity: 0; pointer-events: none; }
.cdv-launch .cdv-logo { border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.cdv-launch-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.cdv-right { right: 24px; }
.cdv-left { left: 24px; }

/* Panel shell: header / scrolling body / floating dock */
.cdv-panel {
  position: fixed; bottom: calc(92px + var(--cdv-lift, 0px)); z-index: var(--cdv-z); width: 400px; height: 700px; max-height: calc(100vh - 116px - var(--cdv-lift, 0px));
  border-radius: 34px; overflow: hidden; display: flex; flex-direction: column;
  background:
    radial-gradient(420px 280px at 10% -5%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(380px 300px at 105% 30%, rgba(214, 214, 210, .9) 0%, rgba(214, 214, 210, 0) 70%),
    radial-gradient(420px 320px at 30% 105%, rgba(205, 205, 201, .95) 0%, rgba(205, 205, 201, 0) 70%),
    linear-gradient(180deg, rgba(240, 240, 237, .9), rgba(228, 228, 225, .92));
  -webkit-backdrop-filter: blur(30px) saturate(1.2); backdrop-filter: blur(30px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 30px 70px rgba(20, 20, 18, .28), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translateY(12px) scale(.985); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.cdv-panel.cdv-open { opacity: 1; transform: none; pointer-events: auto; }
.cdv-art { position: absolute; inset: 0 0 auto 0; height: 260px; background-size: cover; background-position: center; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 55%, transparent 100%); }
.cdv-art::after { content: ''; position: absolute; inset: 0; background: var(--cdv-overlay); }
.cdv-head { position: relative; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding: 16px 16px 6px; flex-shrink: 0; }
.cdv-head-title { text-align: center; font-size: 17px; font-weight: 500; letter-spacing: -.01em; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.cdv-head-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdv-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 104px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.cdv-body::-webkit-scrollbar { display: none; }
.cdv-body > * { flex-shrink: 0; } /* never squash sections into each other; the body scrolls instead */
.cdv-dock { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--cdv-edge); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 10px 26px rgba(20, 20, 18, .12); }
@media (max-width: 640px) {
  .cdv-panel { left: 8px !important; right: 8px !important; top: 8px; bottom: 8px; width: auto; height: auto; max-height: none; border-radius: 28px; }
  .cdv-panel.cdv-open ~ .cdv-launch { display: none; }
}
@media (max-width: 640px) {
  .cdv-launch { bottom: calc(16px + var(--cdv-lift, 0px)); height: 50px; font-size: 14px; }
  .cdv-right { right: 16px; }
  .cdv-left { left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .cdv-panel, .cdv-launch { transition: none; } }

/* Round icon buttons, pills */
.cdv-round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--cdv-edge);
  background: var(--cdv-glass-2); box-shadow: 0 2px 8px rgba(20, 20, 18, .06); color: var(--cdv-ink); }
.cdv-round.cdv-dark { background: linear-gradient(170deg, #2b2b2b, #0e0e0e); color: #fff; border-color: #0e0e0e; }
.cdv-ava { font-weight: 600; font-size: 15px; }
.cdv-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--cdv-edge); background: var(--cdv-glass-2); color: var(--cdv-ink); font-size: 14px; font-weight: 500; text-decoration: none;
  box-shadow: 0 2px 8px rgba(20, 20, 18, .05); }
.cdv-pill-sm { min-height: 32px; padding: 0 12px; font-size: 12px; }
.cdv-primary { background: linear-gradient(170deg, #2b2b2b, #0e0e0e); background: var(--cdv-accent); border-color: transparent; color: #fff !important; box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.cdv-primary[disabled] { opacity: .45; cursor: default; }
.cdv-block { width: 100%; min-height: 50px; font-size: 15px; font-weight: 600; }
.cdv-dock .cdv-pill { flex: 1; min-height: 48px; border: none; background: transparent; box-shadow: none; font-weight: 600; justify-content: flex-start; padding: 0 6px; }
.cdv-dock .cdv-pill .cdv-round { width: 36px; height: 36px; }
.cdv-dock .cdv-pill.cdv-end { justify-content: flex-end; }
.cdv-dock > .cdv-round { width: 48px; height: 48px; }

/* Text */
.cdv-label { font-size: 13px; color: var(--cdv-muted); }
.cdv-h1 { font-size: 26px; font-weight: 400; letter-spacing: -.025em; text-align: center; line-height: 1.15; }
.cdv-big { font-size: 52px; font-weight: 400; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.cdv-dec { color: var(--cdv-faint); }
.cdv-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.cdv-meta { font-size: 13px; color: var(--cdv-muted); }
.cdv-small { font-size: 12px; color: var(--cdv-muted); }
.cdv-name { font-size: 15px; font-weight: 600; }
.cdv-row { display: flex; align-items: center; gap: 12px; }
.cdv-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cdv-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cdv-plus { color: var(--cdv-good); font-weight: 600; white-space: nowrap; }
.cdv-minus { color: var(--cdv-ink); font-weight: 600; white-space: nowrap; }

/* Cards */
.cdv-card { background: var(--cdv-glass); border: 1px solid var(--cdv-edge); border-radius: 24px; padding: 14px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 8px 22px rgba(20, 20, 18, .05); }
.cdv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cdv-tiles .cdv-card { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.cdv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; }
.cdv-action { display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; background: none; padding: 0; font-size: 11px; color: var(--cdv-ink-2); }
.cdv-list { display: flex; flex-direction: column; }
.cdv-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border: none; border-bottom: 1px solid var(--cdv-line); background: none; text-align: left; width: 100%; }
.cdv-item:last-child { border-bottom: none; }
.cdv-group { font-size: 12px; color: var(--cdv-muted); padding-top: 4px; }
.cdv-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; font-size: 13px; background: var(--cdv-glass-2); border: 1px solid var(--cdv-edge); }
.cdv-note-warn { background: rgba(255, 244, 214, .85); color: #5c4100; }
.cdv-note-good { background: rgba(220, 242, 228, .9); color: #17633a; }
.cdv-note-error { background: rgba(255, 228, 228, .9); color: #8e2427; }
.cdv-done { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--cdv-good); }
.cdv-locked { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--cdv-muted); }

/* Redeem: two stacked "swap" cards */
.cdv-swap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.cdv-swap .cdv-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cdv-swap .cdv-card:last-child { background: var(--cdv-glass-2); }
.cdv-swap-ico { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; }
.cdv-amount { font-size: 36px; font-weight: 400; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cdv-token { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; }
.cdv-token .cdv-round { width: 38px; height: 38px; }
.cdv-stepper { display: flex; align-items: center; gap: 10px; }
.cdv-range { width: 100%; accent-color: var(--cdv-accent); min-height: 28px; }

/* Slide to redeem */
.cdv-slide { position: relative; flex: 1; height: 48px; border-radius: 999px; background: rgba(22, 22, 22, .06); overflow: hidden; }
.cdv-slide-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--cdv-ink-2); pointer-events: none; letter-spacing: .01em; }
.cdv-slide input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: grab; }
.cdv-slide input::-webkit-slider-runnable-track { height: 48px; background: transparent; }
.cdv-slide input::-moz-range-track { height: 48px; background: transparent; }
.cdv-slide input::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 48px; border-radius: 50%; background: var(--cdv-accent); border: 4px solid #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.cdv-slide input::-moz-range-thumb { width: 40px; height: 40px; border-radius: 50%; background: var(--cdv-accent); border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.cdv-slide input:disabled { cursor: default; opacity: .5; }

/* Reward code */
.cdv-code { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 999px;
  border: 1.5px dashed rgba(22, 22, 22, .25); background: var(--cdv-glass-2); }
.cdv-code > span { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 16px; letter-spacing: .05em; }
.cdv-big-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--cdv-glass-2); border: 1px solid var(--cdv-edge); box-shadow: 0 8px 22px rgba(20, 20, 18, .08); }
.cdv-big-ico.cdv-ok { color: var(--cdv-good); }

/* VIP: stacked metallic cards */
.cdv-cards { position: relative; height: 250px; margin: 6px 0 2px; perspective: 900px; }
.cdv-vcard { position: absolute; top: 0; left: calc(50% - 105px); width: 210px; height: 250px; border-radius: 24px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 18px 40px rgba(20, 20, 18, .2), inset 0 1px 0 rgba(255, 255, 255, .9); transition: transform .3s ease, opacity .3s ease; color: #161616; overflow: hidden; }
.cdv-vcard::before { content: ''; position: absolute; inset: -40% -60%; background: radial-gradient(closest-side, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0)); transform: rotate(-20deg) translateY(-30%); pointer-events: none; }
.cdv-vcard > * { position: relative; }
.cdv-metal-0 { background: linear-gradient(150deg, #f6f6f4 0%, #d9d9d6 40%, #f1f1ef 62%, #c8c8c4 100%); }
.cdv-metal-1 { background: linear-gradient(150deg, #f7f1e3 0%, #ddd0b0 42%, #f4ecd8 64%, #c9b88f 100%); }
.cdv-metal-2 { background: linear-gradient(150deg, #4a4a4a 0%, #1d1d1d 45%, #3a3a3a 65%, #0d0d0d 100%); color: #fff; border-color: rgba(255, 255, 255, .2); }
.cdv-metal-2::before { background: radial-gradient(closest-side, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); }
.cdv-vcard-tier { font-size: 20px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.cdv-dots { display: flex; justify-content: center; gap: 8px; }
.cdv-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); padding: 0; }
.cdv-dot[aria-pressed="true"] { outline: 2px solid var(--cdv-ink); outline-offset: 2px; }
.cdv-perk { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; }
.cdv-perk svg { color: var(--cdv-good); }

/* Barcode progress (thin vertical lines) */
.cdv-bars { display: block; width: 100%; height: 46px; }

.cdv-date { min-height: 44px; border: 1px solid var(--cdv-line); border-radius: 14px; padding: 0 12px; font: inherit; background: #fff; width: 100%; }
.cdv-skeleton { height: 120px; border-radius: 24px; background: rgba(255, 255, 255, .55); }

/* Image banner (home and signed-out views): logo + "Welcome to" + program name on the image; the first card
   overlaps the banner's bottom edge. Image comes from Panel Design; silver metal when none is set. */
.cdv-banner { position: relative; margin: -8px -16px 0; min-height: 228px; padding: 18px 18px 70px; display: flex; flex-direction: column; gap: 16px;
  color: var(--cdv-banner-ink); background: linear-gradient(150deg, #f6f6f4 0%, #d8d8d4 42%, #f0f0ed 66%, #c3c3bf 100%) center / cover no-repeat; }
.cdv-banner::after { content: ''; position: absolute; inset: 0; background: var(--cdv-overlay); pointer-events: none; }
.cdv-banner > * { position: relative; z-index: 1; }
.cdv-banner-top { display: flex; align-items: flex-start; justify-content: space-between; }
.cdv-banner-top .cdv-logo { width: 44px; height: 44px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.cdv-banner-close { width: 40px; height: 40px; border: none; background: transparent; display: grid; place-items: center; border-radius: 50%; }
#cdv-root .cdv-banner-close { color: var(--cdv-banner-ink); }
.cdv-banner-close:hover { background: rgba(255, 255, 255, .25); }
.cdv-banner-kicker { font-size: 16px; font-weight: 500; }
.cdv-banner-title { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.cdv-banner.cdv-on-image { text-shadow: 0 1px 10px rgba(0, 0, 0, .18); }
.cdv-lift { position: relative; z-index: 2; margin-top: -54px; background: rgba(255, 255, 255, .92); padding: 18px 16px; }

/* The theme's cart drawer lists applied codes (e.g. a Club de VELOCE reward) as bare unpadded text;
   line it up with the drawer's content and show each code as a tag chip. */
.cart-discounts[data-discounts-list] { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; padding: 0 23px !important; }
.cart-discounts[data-discounts-list] > li { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: #f2f2f0; border: 1px solid rgba(22, 22, 22, .08); color: #161616; font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.cart-discounts[data-discounts-list] > li::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat; }
