/* Capture window v2.20.2: compact arena, clean raster balls and provenance UI. */

html[data-ui-revision="pokemon-next"][data-game-theme] body.is-battling
  #battleHud#battleHud[data-capture-ui="v2186"][data-capture-layout="v2202"]:is([data-view="capture"], .is-capture-result) {
  --capture-tray-h: 108px;
  position: fixed !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: min(1180px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: 1180px !important;
  height: min(720px, calc(100dvh - 32px)) !important;
  min-height: 0 !important;
  max-height: 720px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
  border: 1px solid rgba(224, 251, 255, .96) !important;
  border-radius: 28px !important;
  background: #e9f7fa !important;
  box-shadow: 0 28px 84px rgba(1, 26, 38, .34), 0 0 0 1px rgba(19, 120, 151, .12) !important;
}

html[data-game-theme] body.is-battling
  #battleHud[data-capture-layout="v2202"][data-view="capture"] #battleCanvas {
  filter: brightness(1.1) saturate(1.04) !important;
}

html[data-game-theme] body.is-battling
  #battleHud[data-capture-layout="v2202"][data-view="capture"] #captureStage::before {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.02) 0 50%, rgba(4,72,91,.025) 82%, rgba(2,42,56,.08) 100%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 62%, rgba(4,48,61,.1)) !important;
}

html[data-game-theme] body.is-battling
  #battleHud[data-capture-layout="v2202"] .capture-feedback {
  color: #123e53 !important;
  background: rgba(247, 253, 255, .93) !important;
  border-color: rgba(118, 207, 230, .88) !important;
  box-shadow: 0 10px 28px rgba(3, 49, 67, .16), inset 0 1px rgba(255,255,255,.95) !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.05) !important;
  backdrop-filter: blur(8px) saturate(1.05) !important;
}

#battleHud[data-capture-layout="v2202"] .capture-feedback #captureFeedbackKicker {
  color: #128eb7 !important;
}

#battleHud[data-capture-layout="v2202"] .capture-feedback #captureQuality,
#battleHud[data-capture-layout="v2202"] .capture-feedback #captureAttempt {
  color: #153d51 !important;
}

#battleHud[data-capture-layout="v2202"] .capture-aim-guide path {
  stroke: rgba(239, 253, 255, .98) !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 2px 3px rgba(0, 52, 71, .65)) drop-shadow(0 0 5px rgba(69, 217, 255, .55)) !important;
}

#battleHud[data-capture-layout="v2202"] .item-ball-raster-v2202 {
  background-size: 500% 300% !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  filter: drop-shadow(0 3px 3px rgba(5, 34, 47, .2)) !important;
}

#battleHud[data-capture-layout="v2202"] #captureBalls > button {
  contain: layout paint !important;
}

#battleHud[data-capture-layout="v2202"] #captureBalls .capture-ball-icon {
  overflow: visible !important;
}

.pokemon-caught-ball-v2202 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #315d72;
}

.pokemon-caught-ball-v2202 > .pokemon-caught-ball-art-v2202,
.pokemon-caught-ball-v2202 > .pokemon-caught-ball-art-v2202 > * {
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.pokemon-caught-ball-v2202 > span:last-child {
  display: grid;
  min-width: 0;
  text-align: left;
}

.pokemon-caught-ball-v2202 small {
  color: #178bb6;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .09em;
}

.pokemon-caught-ball-v2202 b {
  overflow: hidden;
  color: #244c61;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-caught-ball-v2202.is-team {
  align-self: center;
  max-width: 100%;
  margin-top: 2px;
}

.pokemon-caught-ball-v2202.is-team > .pokemon-caught-ball-art-v2202,
.pokemon-caught-ball-v2202.is-team > .pokemon-caught-ball-art-v2202 > * {
  width: 20px;
  height: 20px;
}

.pokemon-caught-ball-v2202.is-center {
  margin-top: 4px;
}

.pokemon-caught-ball-fact-v2202 .pokemon-caught-ball-v2202 {
  width: 100%;
}

.pokemon-caught-ball-fact-v2202 .pokemon-caught-ball-v2202 > .pokemon-caught-ball-art-v2202,
.pokemon-caught-ball-fact-v2202 .pokemon-caught-ball-v2202 > .pokemon-caught-ball-art-v2202 > * {
  width: 36px;
  height: 36px;
}

.pokemon-caught-ball-partner-v2202 {
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ffc94c, #ef7e25);
  box-shadow: 0 3px 8px rgba(167, 86, 13, .22);
  font-size: 12px;
}

.capture-result-ball-v2202,
.capture-result-ball-v2202 > * {
  width: 112px !important;
  height: 112px !important;
  object-fit: contain !important;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html[data-ui-revision="pokemon-next"][data-game-theme] body.is-battling
    #battleHud#battleHud[data-capture-ui="v2186"][data-capture-layout="v2202"]:is([data-view="capture"], .is-capture-result) {
    --capture-tray-h: 184px;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    height: min(760px, calc(100dvh - 10px)) !important;
    max-height: calc(100dvh - 10px) !important;
    transform: translate(-50%, -50%) !important;
    border: 1px solid rgba(224, 251, 255, .94) !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 48px rgba(1, 26, 38, .3) !important;
  }

  html[data-game-theme] body.is-battling
    #battleHud[data-capture-layout="v2202"] .capture-target-reticle {
    top: 39% !important;
  }

  #battleHud[data-capture-layout="v2202"] #captureBalls .capture-ball-icon,
  #battleHud[data-capture-layout="v2202"] #captureBalls .capture-ball-icon > * {
    width: min(42px, 100%) !important;
    max-width: 42px !important;
    height: min(42px, 100%) !important;
    max-height: 42px !important;
  }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  html[data-ui-revision="pokemon-next"][data-game-theme] body.is-battling
    #battleHud#battleHud[data-capture-ui="v2186"][data-capture-layout="v2202"]:is([data-view="capture"], .is-capture-result) {
    --capture-tray-h: 68px;
    width: calc(100vw - 12px) !important;
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #battleHud[data-capture-layout="v2202"] #battleCanvas {
    filter: brightness(1.08) !important;
  }
}
