/* ==========================================================================
   LOCAL TASK TABS — View / Edit / Delete / ... (menu-local-tasks.html.twig).
   Segmented pill bar with icons. Markup untouched; icons are picked from the
   link's path. Inside the account card the bar is full width (see
   account-redesign.css); elsewhere it sits centred under the site header.
   ========================================================================== */
.primary-tabs,
.secondary-tabs {
  --ink: #0f243e;
  --lime: #a6cf37;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem;
  list-style: none;
  width: fit-content;
  max-width: 100%;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #eef3df;
  border: 0;
  border-radius: 999px;
}
.primary-tabs li,
.secondary-tabs li { margin: 0; padding: 0; list-style: none; }
.primary-tabs li a,
.secondary-tabs li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  font: 700 0.86rem/1.2 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: rgba(15, 36, 62, 0.72);
  text-decoration: none;
  background: transparent;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease;
}
.primary-tabs li a::before,
.secondary-tabs li a::before {
  content: "";
  display: none;
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  background: currentColor;
  -webkit-mask: var(--tab-icon, none) center / contain no-repeat;
  mask: var(--tab-icon, none) center / contain no-repeat;
}
/* icons (set per link kind) */
.primary-tabs li:first-child a::before,
.primary-tabs li a[href$="/edit"]::before,
.primary-tabs li a[href$="/delete"]::before,
.primary-tabs li a[href$="/cancel"]::before,
.primary-tabs li a[href*="social-auth"]::before,
.primary-tabs li a[href$="/revisions"]::before { display: block; }
.primary-tabs li:first-child a { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.primary-tabs li a[href$="/edit"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.primary-tabs li a[href$="/delete"],
.primary-tabs li a[href$="/cancel"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 10v6M14 10v6'/%3E%3C/svg%3E"); }
.primary-tabs li a[href*="social-auth"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.primary-tabs li a[href$="/revisions"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.primary-tabs li a:hover,
.secondary-tabs li a:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); }
.primary-tabs li a.is-active,
.primary-tabs li a[aria-current="page"],
.secondary-tabs li a.is-active {
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  box-shadow: 0 10px 20px -12px rgba(15, 36, 62, 0.55), inset 0 -2px 0 var(--lime);
}
.primary-tabs li a:focus-visible,
.secondary-tabs li a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.primary-tabs li a[href$="/delete"]:hover,
.primary-tabs li a[href$="/cancel"]:hover { color: #b3261e; }
.secondary-tabs { background: transparent; padding: 0; margin-top: -0.4rem; }
.secondary-tabs li a { font-size: 0.8rem; padding: 0.4rem 0.9rem; background: #f4f8e8; }

/* outside the account card: centred under the (fixed) site header */
header[role="banner"] > div > .primary-tabs,
header[role="banner"] > div > .secondary-tabs,
header[role="banner"] .primary-tabs:not(.acct-card__tabs *) {
  margin-inline: auto;
}
@media (max-width: 600px) {
  .primary-tabs, .secondary-tabs { border-radius: 22px; width: 100%; }
  .primary-tabs li a, .secondary-tabs li a { padding: 0.6rem 0.9rem; }
}
