/* Player-led pre-siege deployment: no timer until they press their own battle cry. */
.siege-deploy-panel {
  position:sticky;
  top:8px;
  z-index:9;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px 22px;
  padding:15px clamp(15px,2vw,24px);
  background:linear-gradient(110deg,#203720,#101c22 48%,#151526);
  border:2px solid rgba(133,231,111,.6);
  border-radius:15px;
  box-shadow:inset 0 0 23px rgba(122,240,85,.08), 0 8px 25px rgba(0,0,0,.3);
}
.siege-deploy-panel[hidden],.siege-bonus-panel[hidden] {display:none!important;}
.siege-deploy-copy {min-width:0;flex:1 1 350px;}
.siege-deploy-eyebrow,.siege-bonus-eyebrow {
  color:#affb9c;font-size:.72rem;font-weight:900;letter-spacing:.11em;
}
.siege-deploy-panel h2 {
  margin:5px 0 4px;
  color:#fff1c6;
  font-family:var(--font-display);
  font-size:clamp(1.45rem,2.3vw,2.1rem);font-weight:400;
}
.siege-deploy-panel p {
  margin:0;
  color:#dfedda;
  line-height:1.45;
  font-size:.87rem;
}
.siege-deploy-summary {
  margin-top:9px;
  color:#b8ffd3;
  font-size:.83rem;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.siege-launch-wrap {
  position: relative;
  display: flex;
  flex: 0 1 260px;
  min-width: 215px;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 12;
}

.siege-launch-arrow {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 8px);
  z-index: 14;
  width: clamp(72px, 9vw, 110px);
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
  animation: siege-launch-arrow 0.85s ease-in-out infinite;
}

@keyframes siege-launch-arrow {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(8px) scale(1.06);
  }
}

.siege-launch-button {
  flex:1 1 auto;
  width:100%;
  min-width:0;
  min-height:68px;
  padding:11px 17px;
  border-radius:13px;
  border:2px solid #ffe18a;
  background:linear-gradient(180deg,#ffeb8a,#ffb235 53%,#e97a20);
  color:#2a1102;
  font-family:var(--font-display);
  font-size:clamp(1.3rem,2vw,1.8rem);
  letter-spacing:.025em;
  cursor:pointer;
  box-shadow:0 5px 0 #8f4c10,0 8px 22px rgba(255,145,36,.25);
  transition:transform .15s ease,filter .15s ease;
}
.siege-launch-button:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.12);}
.siege-launch-button:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #8f4c10;}
.siege-launch-button:disabled {
  opacity:.55;
  filter:grayscale(.6);
  box-shadow:none;
  cursor:not-allowed;
}
/* Once it can be pressed, it pulses so kids know this is the button that starts the fight. */
.siege-launch-button:not(:disabled) {
  animation:launch-pulse 1.4s ease-in-out infinite;
}
.siege-launch-button:not(:disabled):hover {
  animation-play-state:paused;
}
@keyframes launch-pulse {
  0%,100% { transform:scale(1); box-shadow:0 5px 0 #8f4c10,0 0 0 0 rgba(255,190,60,.7),0 8px 22px rgba(255,145,36,.25); }
  50% { transform:scale(1.05); box-shadow:0 5px 0 #8f4c10,0 0 0 12px rgba(255,190,60,0),0 8px 30px rgba(255,170,40,.6); }
}
@media (prefers-reduced-motion: reduce) {
  .siege-launch-button:not(:disabled) { animation:none; }
  .siege-launch-arrow { animation:none; }
}
.siege-bonus-panel {
  position:absolute;
  z-index:11;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(6,8,18,.84);
  backdrop-filter:blur(7px);
  padding:clamp(12px,3vw,35px);
}
.siege-bonus-content {
  width:min(100%,640px);
  padding:clamp(19px,3vw,35px);
  border:2px solid #ffd974;
  border-radius:17px;
  text-align:center;
  background:linear-gradient(140deg,#302047,#111b2d);
  box-shadow:0 0 36px rgba(255,192,66,.25);
  color:#fff3db;
}
.siege-bonus-content h2 {
  margin:8px 0 11px;
  font-family:var(--font-display);
  font-weight:400;
  font-size:clamp(1.7rem,3vw,3rem);
  color:#ffde84;
}
.siege-bonus-content p {
  font-size:clamp(.9rem,1.35vw,1.05rem);
  line-height:1.5;
  margin:0 auto 19px;
  max-width:510px;
}
.siege-bonus-content p strong{color:#baffaa;}
.siege-bonus-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;}
.siege-bonus-actions button {
  min-height:53px;padding:10px 19px;
  border-radius:10px;
  border:1px solid #ffd883;
  background:#f1af3e;
  color:#24100a;
  font-family:var(--font-display);
  font-size:1.3rem;
  cursor:pointer;
}
#btn-bonus-decline{
  background:#24203a;color:#ffeac1;
}
.siege-launch-button:focus-visible,.siege-bonus-actions button:focus-visible {
  outline:3px solid white;outline-offset:3px;
}
@media(max-width:650px) {
  .siege-deploy-panel {padding:12px;}
  .siege-launch-wrap {flex:1 1 100%;min-width:0;}
  .siege-launch-button {min-height:55px;}
  .siege-bonus-panel {padding:8px;}
  .siege-bonus-content {padding:13px;}
  .siege-bonus-content p {font-size:.8rem;}
  .siege-bonus-actions button {min-height:46px;font-size:1.1rem;}
}
@media(prefers-reduced-motion:reduce) {
  .siege-launch-button{transition:none;}
}

/* Extra maths is voluntary and the perk is easy to spot without yet another bar. */
.mission-bonus-progress {
  margin-top:9px;
  padding:8px 10px;
  border:1px solid rgba(255,208,100,.56);
  border-radius:8px;
  color:#ffdf96;
  background:rgba(65,45,16,.6);
  font-size:.79rem;
  font-weight:900;
  line-height:1.35;
}

/* Removing a placed hedge or turret: a ring on it and a button above it. */
.siege-remove {
  position: fixed;
  z-index: 60;
  width: 0;
  height: 0;
  pointer-events: none;
}

.siege-remove-ring {
  position: absolute;
  left: calc(var(--ring, 60px) / -2);
  top: calc(var(--ring, 60px) / -2);
  width: var(--ring, 60px);
  height: var(--ring, 60px);
  border: 3px dashed #ffc21a;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 194, 26, .7);
  animation: siege-remove-ring 1.1s ease-in-out infinite;
}

@keyframes siege-remove-ring {
  50% { scale: 1.08; }
}

.siege-remove-btn {
  position: absolute;
  left: 0;
  bottom: calc(var(--ring, 60px) / 2 + 6px);
  translate: -50% 0;
  padding: 6px 12px 5px;
  border: 3px solid #fff;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff5a3c, #c8161f);
  box-shadow: 0 4px 0 #6e0810, 0 6px 14px rgba(0, 0, 0, .55);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .05em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  animation: siege-remove-pop .22s cubic-bezier(.2, 1.4, .4, 1);
}

.siege-remove-btn b {
  color: #ffd84a;
  font-weight: 400;
}

.siege-remove-btn:active {
  translate: -50% 3px;
  box-shadow: 0 1px 0 #6e0810;
}

@keyframes siege-remove-pop {
  from { scale: .6; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .siege-remove-ring,
  .siege-remove-btn { animation: none; }
}
