/* ── Raid Planner ─────────────────────────────────────────────────────────── */

#view-raid-planner { padding: 0; }

.rp-outer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  gap: 14px;
}

/* ── Week nav ─────────────────────────────────────────────────────────────── */

.rp-weeknav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.rp-week-mid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rp-week-label {
  font-size: 14px;
  font-weight: 600;
}

.rp-today-btn {
  font-size: 11px;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  transition: background 0.1s;
}

.rp-today-btn:hover { background: var(--bg3); }

/* ── Day rows ─────────────────────────────────────────────────────────────── */

.rp-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-day {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: opacity 0.15s;
}

.rp-day-past { opacity: 0.5; }

.rp-day-today {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.rp-day-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border-soft);
}

.rp-day-header-wd {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.rp-day-header-date { font-size: 11px; color: var(--muted); }

.rp-day-today .rp-day-header-wd,
.rp-day-today .rp-day-header-date { color: var(--accent); }

.rp-day-body { padding: 12px 14px; }

.rp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.rp-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.3;
}

.rp-chip-gray { background: var(--bg4); color: var(--muted); }
.rp-chip-assigned { font-weight: 700; }

.rp-reco { font-size: 13px; font-weight: 700; margin: 3px 0 0; }
.rp-note { font-size: 11px; color: var(--muted); margin: 3px 0 0; }

.rp-carry { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.rp-hide-cleared-row { margin-bottom: 8px; padding-bottom: 14px; }

/* ── Weekly clears pane (sibling of #views-primary, alongside the raid planner) ── */

#view-raid-clears {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#view-raid-clears.hidden { display: none; }

.rp-clears-pane-header {
  flex-shrink: 0;
  padding: 14px 16px 0;
  text-align: center;
}

.rp-clears-pane-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.rp-clears-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
}

/* Two plain flex columns rather than a grid — a grid ties row height across
   both columns, so expanding a card in one column would leave a matching gap
   in the other. These stack independently. */
.rp-clears-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-clear-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rp-clear-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.rp-clear-card-header::after {
  content: '▾';
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.rp-clear-card-collapsed .rp-clear-card-header { border-bottom-color: transparent; }
.rp-clear-card-collapsed .rp-clear-card-header::after { transform: rotate(-90deg); }

.rp-clear-card-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: break-word;
  /* Wing colors are tuned as solid fills with white text (day chips, header
     checkboxes) — too dark to read as plain text on a dark background, so
     lighten them here. Light theme keeps them closer to the true badge color. */
  color: color-mix(in srgb, var(--rp-wing-color) 55%, white 45%);
}

[data-theme="light"] .rp-clear-card-title {
  color: color-mix(in srgb, var(--rp-wing-color) 85%, black 15%);
}

.rp-clear-card-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.2s ease;
}

.rp-clear-card-body-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.rp-clear-card-collapsed .rp-clear-card-body { grid-template-rows: 0fr; }
.rp-clear-card-collapsed .rp-clear-card-body-inner { opacity: 0; }

.rp-clear-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 10.5px;
  line-height: 1.3;
}

.rp-clear-row:last-child { border-bottom: none; }

.rp-clear-row-done {
  opacity: 0.45;
  background: var(--bg1);
}

.rp-clear-row .daily-item-cb { margin-top: 1px; }

/* Checkboxes (header "all done" + per-row) pick up the wing's badge color when checked. */
.rp-clear-card .daily-item-cb:checked {
  background: var(--rp-wing-color);
  border-color: var(--rp-wing-color);
}

.rp-clear-row-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

/* ── Topbar customize button ── */

#btn-rp-filter {
  display: flex;
  align-items: center;
  gap: 5px;
}
