/* Row-actions affordance for admin list pages.
 *
 * Pairs with the ``_macros/row_actions.html`` macro. Renders the
 * primary verb as a neutral pill on the left and the rest of the
 * row's actions behind a kebab dropdown on the right. Shared
 * across every admin list (Clients, Users, Resources, Roles,
 * Expense categories, Rate sheets) so the visual language is
 * consistent.
 *
 * Design tokens
 * -------------
 *
 * Colors are inlined rather than abstracted into CSS variables —
 * the surface is small and the values match what's already in use
 * elsewhere (Bootstrap's gray scale plus the role colors). A
 * future ``--app-muted``, ``--app-danger`` token sweep can replace
 * these without re-finding the call sites.
 */

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

/* Primary pill — the one-click affordance. Neutral at rest; the
 * subtle outline keeps it visually distinct from raw text but
 * doesn't shout. */
.row-actions-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 100ms ease, color 100ms ease,
    border-color 100ms ease;
}
.row-actions-primary:hover,
.row-actions-primary:focus-visible {
  background: #f8f9fa;
  color: #212529;
  border-color: #adb5bd;
  text-decoration: none;
  outline: 0;
}
.row-actions-primary.danger {
  color: #b6453d;
  border-color: #f5c2c7;
}
.row-actions-primary.danger:hover,
.row-actions-primary.danger:focus-visible {
  background: #fdecec;
  color: #dc3545;
  border-color: #dc3545;
}
.row-actions-primary i {
  font-size: 0.9rem;
  line-height: 1;
}

/* Overflow kebab — three vertical dots that open the secondary
 * menu. Borderless at rest; the hover background pill matches the
 * primary pill's hover state for visual continuity. */
.row-actions-kebab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #6c757d;
  border-radius: 6px;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}
.row-actions-kebab:hover,
.row-actions-kebab:focus-visible,
.row-actions-kebab[aria-expanded="true"] {
  background: #f1f3f5;
  color: #212529;
  outline: 0;
}
.row-actions-kebab i {
  font-size: 1.2rem;
  line-height: 1;
}

/* Dropdown menu items — keep the icon and label aligned, soften
 * the spacing so the menu feels distinct from a bare Bootstrap
 * dropdown without being precious about it. */
.row-actions .dropdown-menu {
  min-width: 180px;
  padding: 4px;
  border-color: #dee2e6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.row-actions .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 0;
  width: 100%;
  text-align: left;
  background: transparent;
}
.row-actions .dropdown-item i {
  font-size: 0.95rem;
  color: #6c757d;
  width: 16px;
  text-align: center;
  flex: 0 0 16px;
}
.row-actions .dropdown-item:hover,
.row-actions .dropdown-item:focus {
  background: #f1f3f5;
  color: #212529;
}
.row-actions .dropdown-item.text-danger i {
  color: #dc3545;
}
.row-actions .dropdown-item.text-danger:hover,
.row-actions .dropdown-item.text-danger:focus {
  background: #fdecec;
  color: #dc3545;
}
