/* ============================================================
 *  BULK SELECT — checkbox sutil + action bar flutuante
 * ============================================================ */

/* ---------- CHECKBOX no card/linha ---------- */
.bulk-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 140ms ease, transform 140ms ease;
}
.bulk-check__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #fff;
  border: 1.5px solid oklch(0.80 0.01 260);
  color: transparent;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bulk-check__box svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity 120ms;
}

/* Revela checkbox SOMENTE quando o modo seleção estiver ativo
   (botão "Selecionar" na barra de filtros) ou quando já houver seleção. */
body.bulk-mode-on .k10-card > .bulk-check,
body.bulk-mode-on [data-task-row] > .bulk-check,
body.bulk-has-selection .k10-card > .bulk-check,
body.bulk-has-selection [data-task-row] > .bulk-check,
.k10-card.is-bulk-selected > .bulk-check,
[data-task-row].is-bulk-selected > .bulk-check {
  opacity: 1;
  transform: scale(1);
}

.bulk-check:hover .bulk-check__box {
  border-color: oklch(0.55 0.15 260);
  transform: scale(1.05);
}

.bulk-check.is-checked .bulk-check__box {
  background: oklch(0.55 0.17 260);
  border-color: oklch(0.55 0.17 260);
  color: #fff;
}
.bulk-check.is-checked .bulk-check__box svg { opacity: 1; }

/* ---------- CARD selecionado ---------- */
.k10-card.is-bulk-selected {
  border-color: oklch(0.55 0.17 260) !important;
  box-shadow: 0 0 0 2px oklch(0.92 0.05 260),
              0 8px 20px rgba(15, 23, 42, 0.06);
  background: oklch(0.995 0.008 260);
}
.k10-card.is-bulk-selected .k10-card__edge {
  background: oklch(0.55 0.17 260) !important;
}

/* tabela */
[data-task-row].is-bulk-selected {
  background: oklch(0.98 0.015 260) !important;
  box-shadow: inset 3px 0 0 oklch(0.55 0.17 260);
}

/* compensa o espaço do checkbox no card — só quando modo seleção ou seleção ativa */
body.bulk-mode-on .k10-card,
body.bulk-has-selection .k10-card {
  padding-left: 32px;
  transition: padding-left 140ms ease;
}
/* edge agora é no TOPO (ds-bridge); não precisa empurrar lateralmente */

/* esconde actions de hover quando seleção ativa (não confundir UI) */
body.bulk-has-selection .k10-card__actions { display: none; }

/* ---------- ACTION BAR ---------- */
.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: oklch(0.18 0.008 260);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(10, 15, 30, 0.40),
              0 4px 12px rgba(10, 15, 30, 0.20);
  font-family: "Inter Tight", "Inter", -apple-system, sans-serif;
  font-size: 13px;
  animation: bulkBarIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bulkBarIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.bulk-bar__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
}
.bulk-bar__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: oklch(0.55 0.17 260);
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0;
}
.bulk-bar__lbl {
  font-size: 12.5px;
  font-weight: 500;
  color: oklch(0.88 0.008 260);
  letter-spacing: -0.005em;
}
.bulk-bar__sep {
  width: 1px;
  height: 22px;
  background: oklch(0.28 0.008 260);
  margin: 0 2px;
  flex-shrink: 0;
}

.bulk-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: transparent;
  color: #fff;
  border: 0;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 120ms;
  white-space: nowrap;
}
.bulk-bar__btn:hover {
  background: oklch(0.26 0.01 260);
}
.bulk-bar__btn:focus-visible {
  outline: 2px solid oklch(0.70 0.14 260);
  outline-offset: 2px;
}
.bulk-bar__btn svg { flex-shrink: 0; }
.bulk-bar__btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.bulk-bar__btn--danger {
  color: oklch(0.82 0.12 25);
}
.bulk-bar__btn--danger:hover {
  background: oklch(0.30 0.08 25);
  color: oklch(0.88 0.14 25);
}
.bulk-bar__btn--ghost {
  color: oklch(0.72 0.008 260);
  padding: 7px 9px;
}
.bulk-bar__btn--ghost:hover { color: #fff; }

/* ---------- MENU "Mover para" ---------- */
.bulk-bar__group {
  position: relative;
}
.bulk-bar__menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  padding: 6px;
  background: oklch(0.20 0.008 260);
  border: 1px solid oklch(0.26 0.008 260);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(10, 15, 30, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 10;
  animation: bulkMenuIn 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bulkMenuIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.bulk-bar__mi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 120ms;
  white-space: nowrap;
}
.bulk-bar__mi:hover { background: oklch(0.28 0.01 260); }
.bulk-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.62 0.02 260);
  flex-shrink: 0;
}
.bulk-bar__dot--backlog     { background: oklch(0.62 0.02 80); }
.bulk-bar__dot--doing       { background: oklch(0.65 0.17 260); }
.bulk-bar__dot--review      { background: oklch(0.68 0.17 35); }
.bulk-bar__dot--done        { background: oklch(0.65 0.16 165); }
.bulk-bar__dot--protocolada { background: oklch(0.60 0.14 280); }
.bulk-bar__dot--arquivada   { background: oklch(0.60 0.01 80); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .bulk-bar {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
  @keyframes bulkBarIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .bulk-bar__btn--ghost { padding: 7px; }
  .bulk-bar__btn--ghost span { display: none; }
}
