.tm-action-menu {
  display:inline-block;
  position:relative;
}

.tm-action-menu > .trigger {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow:0 1px 2px rgba(15, 23, 42, .08);
  color:var(--ink);
  cursor:pointer;
  list-style:none;
  transition:background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.tm-action-menu > .trigger::-webkit-details-marker { display:none; }
.tm-action-menu > .trigger::marker { content:""; }

.tm-action-menu > .trigger:hover,
.tm-action-menu[open] > .trigger {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}

.tm-action-menu > .trigger:focus-visible {
  outline:3px solid var(--accent-soft);
  outline-offset:2px;
}

.tm-action-menu[open] {
  z-index:100;
}

.tm-action-menu .dropdown {
  display:block;
  position:fixed;
  top:0;
  left:0;
  right:auto;
  bottom:auto;
  min-width:240px;
  max-width:min(320px, calc(100vw - 32px));
  z-index:1000;
}

.tm-action-menu__item {
  width:100%;
  background:none;
  border:0;
  cursor:pointer;
  font:inherit;
  text-align:left;
}

.tm-action-menu__item.is-active {
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:800;
}

.tm-action-menu__item:disabled {
  cursor:default;
  opacity:1;
}

.tm-action-menu-cell {
  min-width:150px;
}

.tm-action-menu--icon > .trigger {
  width:34px;
  height:34px;
  padding:0;
  border-radius:8px;
  font-size:21px;
  font-weight:800;
  line-height:1;
}

.tm-action-menu--picker {
  width:100%;
  max-width:240px;
}

.tm-action-menu--picker > .trigger {
  width:100%;
  height:auto;
  min-height:36px;
  justify-content:space-between;
  gap:10px;
  padding:7px 10px;
  border-radius:999px;
  font-size:14px;
  line-height:1.2;
}

.tm-action-menu--compact {
  max-width:190px;
}

.tm-action-menu__label {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tm-action-menu__caret {
  color:var(--muted);
  flex:0 0 auto;
  font-size:13px;
  line-height:1;
}

.tm-action-menu__dropdown--scroll {
  max-height:260px;
  overflow-y:auto;
}

.tm-menu__group {
  border-top:1px solid var(--border);
  padding:4px 0;
}

.tm-menu__group-label {
  align-items:center;
  color:var(--muted);
  cursor:pointer;
  display:flex;
  font-size:12px;
  font-weight:800;
  justify-content:space-between;
  letter-spacing:0;
  line-height:1.2;
  list-style:none;
  padding:8px 12px;
  text-transform:uppercase;
}

.tm-menu__group-label::-webkit-details-marker { display:none; }
.tm-menu__group-label::marker { content:""; }

.tm-menu__group-label::after {
  color:var(--muted);
  content:"⌄";
  flex:0 0 auto;
  font-size:12px;
  line-height:1;
  transition:transform .15s ease;
}

.tm-menu__group[open] > .tm-menu__group-label::after {
  transform:rotate(180deg);
}

.tm-menu__group .tm-action-menu__item {
  padding-left:22px;
}

@media (max-width:700px) {
  .tm-action-menu .dropdown {
    position:fixed;
    top:auto;
    left:16px;
    right:16px;
    bottom:16px;
    min-width:auto;
    max-width:none;
  }
}

.tm-filter-field {
  display:grid;
  gap:6px;
}

.tm-filter-chips {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface);
  color:var(--ink-2, var(--ink));
  font-size:14px;
  font-weight:650;
  line-height:1.2;
  text-decoration:none;
  transition:background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.chip:hover {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
  text-decoration:none;
}

.chip.is-active {
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
  box-shadow:0 6px 16px rgba(37, 99, 235, .18);
}
