/* Take a break. Scoped to the picker and the game dialog. */

.bookie-break-picker {
  width: 280px;
  max-width: calc(100vw - 24px);
  z-index: 400;
}

.bookie-break-picker-title,
.bookie-break-title {
  margin: 2px 8px 8px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.bookie-break-durations {
  display: flex;
  gap: 4px;
  padding: 0 4px 6px;
}

.bookie-break-durations button {
  text-align: center;
}

.bookie-break-picker button[aria-pressed="true"] {
  background: var(--sm-ai-highlight, #e8e4f0);
  outline: 2px solid var(--sm-lavender, #bba2ff);
  outline-offset: -2px;
}

.bookie-break-game {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.bookie-break-game svg {
  flex: 0 0 auto;
}

.bookie-break-game-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bookie-break-game-copy small {
  color: var(--sm-text-muted, #5c6170);
  font-size: 12px;
}

.bookie-break-note {
  margin: 4px 8px 2px;
  color: var(--sm-text-muted, #5c6170);
  font-size: 12px;
  line-height: 1.35;
}

.bookie-break-dialog {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: var(--sm-text, #1a1f2e);
}

.bookie-break-dialog::backdrop {
  background: rgba(28, 22, 48, 0.2);
}

.bookie-break-stage {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(246, 243, 255, 0.94);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(20, 24, 38, 0.16);
  overflow: hidden;
}

.bookie-break-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "title score cluster" "lives score cluster";
  align-items: center;
  gap: 6px 8px;
  padding: 8px;
  position: relative;
  z-index: 2;
}

.bookie-break-title { grid-area: title; margin: 0; }
.bookie-break-score {
  grid-area: score;
  margin: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #241b3d;
  text-align: center;
}
.bookie-break-lives { grid-area: lives; margin: 0; font-size: 14px; }
.bookie-break-cluster {
  grid-area: cluster;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.bookie-break-hud button,
.bookie-break-banner button,
.bookie-break-extras button,
.bookie-break-primary {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--sm-border, #c4c2ce);
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.bookie-break-primary,
.bookie-break-hud button.bookie-break-primary {
  background: #efe7ff;
  border-color: var(--sm-lavender, #bba2ff);
  font-weight: 700;
}

.bookie-break-time {
  margin: 0;
  min-width: 52px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bookie-break-stage.is-narrow .bookie-break-hud {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title time" "score score" "lives lives" "cluster cluster";
}

.bookie-break-stage.is-narrow .bookie-break-cluster { justify-content: flex-start; }
.bookie-break-stage.is-narrow .bookie-break-score { text-align: left; font-size: 24px; }

.bookie-break-instruction {
  margin: 0 8px 6px;
  font-size: 14px;
  line-height: 1.35;
}

.bookie-break-stage > .bookie-break-primary { align-self: flex-start; margin: 0 8px 8px; }

.bookie-break-extras { padding: 0 8px 6px; }

.bounce-nudge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.bookie-break-field {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 8px 8px;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  background: linear-gradient(#f7f4ff, #efe8ff);
  border-radius: 12px;
  border: 1px solid #ddd6f3;
}

.bookie-break-field.is-catch,
.bookie-break-field.is-bounce { background: #f4f1fb; }

.bookie-break-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.bb-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.bb-net { transform-box: fill-box; transform-origin: center top; }
.bb-net.is-squash { transform: scaleY(0.82); }

.bb-pop {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -120%);
  font-weight: 800;
  color: #2f6f4e;
  pointer-events: none;
}

.catch-floor, .bounce-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 4px;
  background: #d9d0ef;
}

.bounce-paddle {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 8px;
  background: linear-gradient(#7ed9cf, #2bb5a0);
  box-shadow: 0 4px 10px rgba(43, 181, 160, 0.28);
  z-index: 2;
}

.catch-spark {
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  color: #2f6f4e;
  font-weight: 800;
  pointer-events: none;
}

.bookie-game-actor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
}

.bookie-game-pose { width: 100%; height: 100%; transform-origin: 50% 47%; }
.bookie-game-mascot, .bookie-game-mascot .bookie-rig { width: 100%; height: 100%; animation: none !important; }
.bookie-break-field.is-catch .bookie-game-mascot,
.bookie-break-field.is-catch .bookie-game-mascot * {
  pointer-events: none !important;
  cursor: default !important;
  -webkit-user-drag: none;
  user-select: none;
}
.bookie-game-mascot svg { width: 100%; height: 100%; display: block; }

.bookie-game-hit {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: grab;
}

.bookie-game-hit.catch-target,
.bookie-game-hit.catch-target:active {
  left: 0;
  top: 0;
  width: 78px;
  height: 78px;
  min-width: 78px;
  min-height: 78px;
  transform: none;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.bookie-break-banner {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--sm-border, #c4c2ce);
  box-shadow: 0 8px 20px rgba(20, 24, 38, 0.12);
}

.bookie-break-banner p,
.bookie-break-banner h2 { margin: 0; flex: 1 1 100%; }
.bookie-break-summary { margin: 0; padding-left: 18px; flex: 1 1 100%; }
.bookie-break-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.bookie-break-picker.is-overlay {
  position: absolute;
  left: 12px;
  top: 64px;
  z-index: 6;
}

.bookie-game-mascot .bookie-eye-shut,
.bookie-game-mascot .bookie-mouth-flat,
.bookie-game-mascot .bookie-mouth-oh,
.bookie-game-mascot .bookie-mouth-sleep,
.bookie-game-mascot .bookie-mouth-worry { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bb-pop, .bb-net.is-squash, .bounce-paddle, .bookie-game-pose { animation: none !important; transition: none !important; }
}
