/* The Raids tab: group cards beside a dense roster list to drag characters from. */

.raid-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.raid-plans { display: grid; gap: 16px; min-width: 0; }
.raid-plans-toolbar { display: flex; align-items: center; gap: 14px; }
.raid-empty { padding: 30px var(--gutter); color: #9facb7; font-size: 19px; line-height: 1.55; }
.raid-empty strong { color: var(--gold); }

/* Group cards */
.raid-plan.active { border-color: #7a6641; }
.raid-plan-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px var(--gutter); border-bottom: 1px solid var(--divider); }
.raid-title { flex: 1 1 180px; min-width: 0; height: 40px; border: 1px solid transparent; background: transparent; color: var(--heading); font: 600 20px var(--font-display); padding: 0 8px; border-radius: 3px; }
.raid-title:hover { border-color: var(--input-border); }
.raid-title:focus { border-color: var(--focus); background: #1a2a39; outline: none; }
.raid-content { height: 40px; border: 1px solid var(--input-border); background: #1b2a37; color: var(--text); font-size: 16px; padding: 0 8px; border-radius: 3px; }
.sub-nav + .raid-layout { margin-top: 16px; }
.view-only { grid-template-columns: minmax(0, 1fr); }
h2.raid-title { margin: 0; font: 600 20px var(--font-display); line-height: 40px; }
.raid-kind { color: var(--text-faint); font-size: 16px; }
.raid-count { color: var(--text-faint); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }
.raid-count.full { color: #a3dfba; }
.raid-delete, .raid-remove { border: 0; background: transparent; color: #8797a4; font-size: 24px; line-height: 1; padding: 0 8px; border-radius: 3px; }
.raid-delete { height: 40px; }
.raid-delete:hover, .raid-remove:hover { color: var(--error); background: var(--raised); }

.raid-parties { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 16px var(--gutter) 20px; }
.raid-parties.single { grid-template-columns: minmax(0, 420px); }
.raid-party { border: 1px solid var(--divider); border-radius: 5px; background: #111f2c; min-width: 0; }
.raid-party h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--divider); color: var(--gold-label); font-size: 14px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.raid-party h3 small { color: var(--text-faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.raid-party-slots { display: grid; gap: 4px; padding: 6px; }

/* Slots and roster rows share one compact layout: icon, name over spec, level. */
.raid-slot { display: flex; align-items: center; gap: 4px; min-height: 40px; border: 1px dashed #3b4b58; border-radius: 4px; background: #14212d; padding-left: 6px; }
.raid-slot.filled { border-style: solid; border-color: #34454f; background: var(--raised); cursor: grab; }
.raid-slot.ready { border-color: #7a6641; }
.raid-slot.selected { border-color: var(--focus); background: #2b3340; }
.raid-slot.conflict { border-color: #b07a4f; }
.raid-slot.drop-target { border-color: var(--focus); background: #2a3138; }
.raid-slot.dragging, .raid-member.dragging { opacity: .45; }
.raid-slot-number { flex: 0 0 16px; color: #66767f; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; }
.raid-slot-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; align-self: stretch; cursor: pointer; }
.raid-slot-empty { color: #66767f; font-size: 15px; }
.raid-warning { color: #e0a56a; font-size: 16px; padding-right: 4px; }

.raid-member { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 12px; cursor: grab; border-bottom: 1px solid #1d2c39; }
.raid-member:hover { background: var(--raised); }
.raid-member.selected { background: #2b3340; box-shadow: inset 3px 0 var(--focus); }
.raid-member.taken { opacity: .5; }
.class-icon { flex: 0 0 26px; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 4px; object-fit: cover; background: var(--raised); }
.class-icon-letter { display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.raid-name-block { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.raid-member-name { color: var(--text); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raid-member-spec { color: var(--text-faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raid-member-spec:empty { display: none; }
.raid-member-level { flex: 0 0 auto; color: var(--gold); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; padding-right: 2px; }
.raid-slot .raid-member-level { padding-right: 6px; }

/* Roster list */
.raid-pool { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: hidden; }
.raid-pool-tools { display: grid; gap: 10px; padding: 12px var(--gutter) 12px; border-bottom: 1px solid var(--divider); }
.raid-class-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.raid-class-button { border: 1px solid transparent; border-radius: 5px; background: none; padding: 2px; opacity: .55; }
.raid-class-button:hover { opacity: 1; }
.raid-class-button.selected { opacity: 1; border-color: var(--focus); background: var(--raised); }
.raid-class-button .class-icon { display: block; }
.raid-pool-note, .raid-selection { margin: 0; color: var(--text-faint); font-size: 14px; }
.raid-pool-note strong { color: var(--text); font-weight: 600; }
.raid-selection { color: #f2d598; }
.raid-selection .text-button { font-size: 14px; padding: 0 0 0 6px; }
.raid-pool-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0; }
.raid-pool-empty { color: #9facb7; padding: 20px var(--gutter); font-size: 16px; }

@media (max-width: 900px) {
  .raid-layout { grid-template-columns: minmax(0, 1fr); }
  /* Selecting a character, then a slot, is the way to place on a phone, so the list leads. */
  .raid-pool { order: -1; position: static; max-height: 380px; }
}

@media (max-width: 560px) {
  .raid-title { font-size: 18px; }
  .raid-parties { padding: 12px 10px 14px; }
}
