/* ============================================================
   GOLF SCROLL PROGRESS BAR
   ============================================================ */

.sgb-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 800;
  height: 36px;
  background-color: #0B1C08;
  border-bottom: 2px solid #C9A84C;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
  .sgb-bar { top: 60px; }
}

.sgb-bar.sgb-visible {
  transform: translateY(0);
}

.sgb-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  gap: 6px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Club icon ---- */
.sgb-golfer-wrap {
  flex-shrink: 0;
  width: 18px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sgb-golfer-svg {
  display: block;
  width: 18px;
  height: 32px;
  overflow: visible;
}

/* ---- Track (contains the track line, fill, ball, AND hole) ---- */
.sgb-track-wrap {
  flex: 1;
  position: relative;
  height: 36px;
}

.sgb-track-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background-color: #1D4A18;
  border-radius: 3px;
}

.sgb-track-fill {
  position: absolute;
  left: 0;
  width: 0%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: linear-gradient(90deg, #A8882A, #C9A84C);
  border-radius: 3px;
  transition: width 0.12s linear;
}

/* ---- Ball ---- */
.sgb-ball-container {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.12s linear;
  z-index: 3;
}

.sgb-ball {
  width: 11px;
  height: 11px;
  background: radial-gradient(circle at 38% 35%, #FFFFFF, #DDDDDD);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,255,255,0.55), 0 1px 3px rgba(0,0,0,0.45);
}

/* ---- Hole (absolutely positioned inside track at the right end) ---- */
.sgb-track-wrap .sgb-hole-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sgb-hole-svg {
  display: block;
  width: 20px;
  height: 32px;
  overflow: visible;
}

/* ---- Swing animation (club) ---- */
.sgb-swing-arm {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  transform: rotate(45deg); /* resting at 225°: lower-left */
}

.sgb-golfer-wrap.sgb-swung .sgb-swing-arm {
  animation: sgb-arm-swing 0.52s ease-out forwards;
}

@keyframes sgb-arm-swing {
  0%   { transform: rotate(45deg); }   /* 225°: lower-left, start */
  65%  { transform: rotate(-48deg); }  /* overshoot past 315° */
  83%  { transform: rotate(-42deg); }  /* bounce back */
  100% { transform: rotate(-45deg); }  /* 315°: lower-right, settle */
}

/* ---- Ball rolls toward hole and sinks in ---- */
.sgb-ball-container.sgb-sinking {
  animation: sgb-sink 0.6s ease-in forwards !important;
  transition: none !important;
}

@keyframes sgb-sink {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  30%  { transform: translate(calc(-50% + 14px), -30%) scale(0.8); opacity: 0.9; }
  65%  { transform: translate(calc(-50% + 28px), -8%) scale(0.5); opacity: 0.75; }
  100% { transform: translate(calc(-50% + 38px), 10px) scale(0.05); opacity: 0; }
}

/* ---- Hole celebrates when ball drops in ---- */
.sgb-track-wrap .sgb-hole-wrap.sgb-celebrating {
  animation: sgb-celebrate 0.55s ease-out forwards;
}

@keyframes sgb-celebrate {
  0%   { transform: translateY(-50%) scale(1); }
  35%  { transform: translateY(-50%) scale(1.3); }
  65%  { transform: translateY(-50%) scale(0.88); }
  100% { transform: translateY(-50%) scale(1); }
}

/* ============================================================
   HOLE IN ONE BONUS POPUP
   ============================================================ */

.hole-bonus {
  position: fixed;
  bottom: 22px;
  right: 20px;
  z-index: 8500;
  width: 300px;
  transform: translateY(180px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.4s ease;
}

.hole-bonus.hole-bonus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header — collapsed card */
.hole-bonus .hole-bonus-header {
  background: linear-gradient(160deg, #162F12 0%, #0D1F0A 55%, #0A1808 100%);
  border: 2px solid #C9A84C;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 1px rgba(201,168,76,0.15);
  transition: box-shadow 0.2s ease, border-radius 0.3s ease, border-bottom-color 0.3s ease;
}

.hole-bonus.hole-bonus-open .hole-bonus-header {
  border-radius: 12px 12px 0 0;
  border-bottom-color: #183A16;
}

.hole-bonus .hole-bonus-header:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 4px rgba(201,168,76,0.28);
}

/* Pulse glow after appearing */
.hole-bonus.hole-bonus-visible .hole-bonus-header {
  animation: hole-bonus-pulse 1.8s ease-out 0.65s 3;
}

@keyframes hole-bonus-pulse {
  0%   { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 0 rgba(201,168,76,0.75); }
  55%  { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 16px rgba(201,168,76,0); }
  100% { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 0 rgba(201,168,76,0); }
}

/* Top row: flag + label + dismiss */
.hole-bonus .hole-bonus-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 9px 14px;
  border-bottom: 1px solid rgba(201,168,76,0.18);
  background: linear-gradient(90deg, rgba(201,168,76,0.1) 0%, transparent 70%);
}

.hole-bonus .hole-bonus-flag { flex-shrink: 0; display: flex; align-items: center; }

.hole-bonus .hole-bonus-label {
  flex: 1;
  font-size: 11px;
  font-weight: 900;
  color: #C9A84C;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hole-bonus .hole-bonus-dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.hole-bonus .hole-bonus-dismiss:hover { background-color: rgba(255,255,255,0.1); }

/* Offer area */
.hole-bonus .hole-bonus-header-offer { padding: 12px 16px 10px; }

.hole-bonus .hole-bonus-header-brand {
  display: block;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  color: #FF9900;
  background-color: rgba(15,15,15,0.75);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.hole-bonus .hole-bonus-header-amount {
  font-size: 30px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.hole-bonus .hole-bonus-header-amount .hole-bonus-amount-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0;
}

.hole-bonus .hole-bonus-header-trigger {
  font-size: 11px;
  color: rgba(255,255,255,0.42);
  line-height: 1.45;
}

/* CTA footer strip */
.hole-bonus .hole-bonus-header-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 10px 16px;
  background: rgba(201,168,76,0.08);
  border-top: 1px solid rgba(201,168,76,0.18);
}

.hole-bonus .hole-bonus-header-cta-label {
  font-size: 12px;
  font-weight: 800;
  color: #C9A84C;
  letter-spacing: 0.3px;
}

.hole-bonus .hole-bonus-chevron {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.hole-bonus.hole-bonus-open .hole-bonus-chevron { transform: rotate(180deg); }

/* Body — expandable content */
.hole-bonus .hole-bonus-body {
  max-height: 0;
  overflow: hidden;
  background-color: #091506;
  border: 2px solid #C9A84C;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hole-bonus.hole-bonus-open .hole-bonus-body {
  max-height: 300px;
}

.hole-bonus .hole-bonus-body-inner {
  padding: 16px 16px 14px;
}

.hole-bonus .hole-bonus-congrats {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1.2;
}

.hole-bonus .hole-bonus-desc {
  font-size: 12px;
  color: #999999;
  line-height: 1.55;
  margin-bottom: 14px;
}

.hole-bonus .hole-bonus-offer {
  background-color: #0D1F0A;
  border: 1px solid #2A4A28;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.hole-bonus .hole-bonus-brand {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #FF9900;
  background-color: #1A1A1A;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  width: fit-content;
}
.hole-bonus .hole-bonus-cta-wrap { display: block; margin-bottom: 10px; }
.hole-bonus .hole-bonus-cta-wrap .hole-bonus-cta { margin-bottom: 0; }

.hole-bonus .hole-bonus-offer-text {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.hole-bonus .hole-bonus-cta {
  display: block;
  text-align: center;
  background-color: #C9A84C;
  color: #0D1F0A;
  font-size: 14px;
  font-weight: 800;
  padding: 11px 16px;
  border-radius: 5px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background-color 0.15s ease;
}

.hole-bonus .hole-bonus-cta:hover {
  background-color: #A8882A;
  color: #0D1F0A;
  text-decoration: none;
}

.hole-bonus .hole-bonus-legal {
  font-size: 10px;
  color: #4A4A4A;
  text-align: center;
  line-height: 1.4;
}
