/* raid.css — 5v1 boss raid styles. Layered on top of cock_fight.css. */

/* Header launcher button (sits next to Cock Fight) */
#raid-btn {
  background: linear-gradient(135deg, #1a2a48, #0a1428);
  border: 1.5px solid #4080c0;
  border-radius: 8px;
  color: #a0c8ff;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.2s;
  letter-spacing: 0.02em;
  box-shadow: 0 0 10px 2px rgba(80, 140, 220, 0.35), 0 0 20px 4px rgba(80, 140, 220, 0.18);
}
#raid-btn:hover {
  background: linear-gradient(135deg, #2a3a58, #18223e);
  border-color: #60a0e0;
  color: #d0e8ff;
  box-shadow: 0 0 14px 3px rgba(120, 180, 240, 0.55), 0 0 28px 6px rgba(80, 140, 220, 0.3);
}

/* ── Picker: team-slot row ───────────────────────────────────────────── */
.rd-team-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #3a186033;
  background: rgba(58, 24, 96, 0.18);
  flex-wrap: wrap;
}
.rd-team-slot {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1.5px dashed #5030a055;
  border-radius: 8px;
  background: #0e0420;
  color: #b090d0;
  font-size: 12px;
  cursor: default;
}
.rd-team-slot-on {
  border-style: solid;
  border-color: #b070ff;
  background: linear-gradient(180deg, #2a1450, #160828);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(140, 70, 210, 0.3);
}
.rd-team-slot-on:hover { filter: brightness(1.15); }
.rd-slot-num {
  font-weight: 800;
  font-size: 12px;
  color: #ffe0a0;
  min-width: 22px;
}
.rd-slot-cyl {
  width: 8px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.rd-slot-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.rd-slot-empty { font-style: italic; color: #80608a; font-size: 11px; }
.rd-slot-x     { color: #ff8090; font-weight: 800; }

.rd-team-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #3a186033;
}
.rd-team-hint { color: #c0a0e0; font-size: 12px; flex: 1; }
.rd-team-clear, .rd-team-start {
  padding: 6px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.12s, background 0.12s;
}
.rd-team-clear { background: #2a1a40; border: 1px solid #6040a0; color: #d0b0ff; }
.rd-team-clear:hover { background: #3a2a50; }
.rd-team-start {
  background: linear-gradient(180deg, #c06030, #803010);
  border: 1px solid #ffa050;
  color: #fff;
  box-shadow: 0 2px 10px rgba(192, 96, 48, 0.4);
}
.rd-team-start:hover:not(:disabled) { filter: brightness(1.18); }
.rd-team-start:disabled { filter: grayscale(0.6) brightness(0.6); cursor: not-allowed; }

.rd-pick-card-on {
  border-color: #ffd060 !important;
  box-shadow: 0 0 14px rgba(255, 200, 80, 0.45);
}
.rd-pick-slot {
  display: inline-block;
  background: #ffd060;
  color: #2a1408;
  font-weight: 800;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 999px;
  margin-right: 4px;
}

/* ── Battle layout (vertical: boss on top, team across bottom) ───────── */
.rd-battle-modal .rd-arena {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 14px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 80, 80, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 82%, rgba(140, 70, 210, 0.18), transparent 55%),
    linear-gradient(180deg, #1a0a30 0%, #0d0820 50%, #160826 100%);
  overflow: hidden;
  min-height: 0;
}
.rd-side-boss {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  flex-direction: column-reverse;
}
.rd-info-boss { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 26px var(--type-color, transparent); }
/* Long boss names get to wrap in slot machine + preview cards. */
.rd-slot-modal .cf-slot-row-name {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.15;
}
.rd-slot-modal .cf-preview-name {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: clip;
}
/* Long boss names get two lines instead of being ellipsised. */
.rd-info-boss .cf-info-name {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.15;
}
/* Keep the level badge aligned to the top edge of the wrapped name. */
.rd-info-boss .cf-info-row { align-items: flex-start; }
.rd-boss-stage { height: 170px; }
.rd-boss-cyl {
  width: 60px;
  height: 150px;
  border-radius: 18px;
}

.rd-team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: auto;
}
.rd-ally {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 8px;
  background: linear-gradient(180deg, #1a0830, #0e0420);
  border: 1.5px solid #5030a055;
  border-radius: 10px;
  color: #f0d0ff;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, filter 0.2s, opacity 0.2s;
}
.rd-ally-active {
  border-color: #ffd060;
  box-shadow: 0 0 16px rgba(255, 200, 80, 0.55);
}
.rd-ally-dead {
  filter: grayscale(0.85) brightness(0.55);
  opacity: 0.65;
}
.rd-ally-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}
.rd-ally-num {
  background: #ffd060;
  color: #2a1408;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}
.rd-ally-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.rd-ally-lvl   { color: #c0a0e0; font-size: 10px; }
.rd-ally-types { display: flex; gap: 3px; flex-wrap: wrap; }
.rd-ally-cyl-wrap {
  display: flex;
  justify-content: center;
  height: 60px;
  align-items: flex-end;
  margin-top: 2px;
}
.rd-ally-cyl {
  width: 22px;
  height: 56px;
  border-radius: 8px;
}
.rd-ally .cf-hp-num { font-size: 10px; color: #c0a0e0; }
.rd-actor-line {
  font-size: 12px;
  color: #ffd060;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 200, 80, 0.45);
}
.rd-hit-flash {
  /* Hit flashes for the raid are absolutely positioned by JS using the
     target element's bounding rect, overriding the cf-hit-foe / cf-hit-you
     fixed corners used by cock_fight. */
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

@media (max-width: 720px) {
  .rd-team        { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .rd-ally-cyl    { width: 18px; height: 44px; }
  .rd-boss-cyl    { width: 48px; height: 120px; }
  .rd-team-slot   { min-width: 95px; }
}
