/* Account presentation shared by the WorkFlow applications. Actions stay in each app. */
[data-wf-module] {
  --wf-account-accent: #b7bec4;
  --wf-account-bg: #232326;
  --wf-account-border: #414147;
  --wf-account-text: #f6f5f3;
  --wf-account-muted: #c5c3c7;
}
[data-wf-module="autoflow"] { --wf-account-accent: #ffab05; }
[data-wf-module="b2bflow"] { --wf-account-accent: #d98a58; }
[data-wf-module="cashflow"] { --wf-account-accent: #05cc76; }
[data-wf-module="fitflow"] { --wf-account-accent: #f66b87; }
[data-wf-module="payflow"] { --wf-account-accent: #65b4ff; }
[data-wf-module="processflow"] { --wf-account-accent: #7ddc1d; }
[data-wf-module="serwisflow"] { --wf-account-accent: #00dccb; }
[data-wf-module="shiftflow"] { --wf-account-accent: #c88cff; }
body:not(.dark-theme) [data-wf-module="fitflow"] {
  --wf-account-bg: #fff;
  --wf-account-border: #cabcc3;
  --wf-account-text: #29242a;
  --wf-account-muted: #645862;
}

body .wf-account[data-wf-module].wf-account {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 7px;
  border: 1px solid var(--wf-account-border);
  border-radius: 9px;
  background: var(--wf-account-bg);
  color: var(--wf-account-text);
  box-shadow: none;
  text-align: start;
}
body .wf-account[hidden], .wf-account [hidden] { display: none !important; }
.wf-account .wf-account-avatar.wf-account-avatar,
.wf-account #account-avatar.wf-account-avatar {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--wf-account-accent) 70%, #272328);
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--wf-account-accent);
  background-position: center;
  background-size: cover;
  color: #211921;
  box-shadow: none;
  font: 750 12px/1 system-ui, sans-serif;
}
.wf-account-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.wf-account .wf-account-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: start;
}
.wf-account :is(.wf-account-name, .wf-account-role) {
  display: block;
  margin: 0;
  overflow: hidden;
  letter-spacing: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-account .wf-account-name { color: var(--wf-account-text); font: 650 12px/1.3 system-ui, sans-serif; }
.wf-account .wf-account-role { color: var(--wf-account-muted); font: 400 11px/1.3 system-ui, sans-serif; }
.wf-account .wf-account-actions { display: flex; flex: none; align-items: center; gap: 3px; }

body .wf-account :is(.wf-account-action.wf-account-action, .wf-account-open) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--wf-account-muted);
  box-shadow: none;
  cursor: pointer;
}
body .wf-account[data-wf-module] .wf-account-info.wf-account-open { display: flex; align-items: stretch; gap: 2px; }
body .wf-account[data-wf-module] .wf-account-info.wf-account-open > * { text-align: start; }
body .wf-account[data-wf-module] .wf-account-action:is(.wf-account-action, #af-theme-trigger, #b2b-theme-open, #cf-theme-open, #logout) {
  flex: 0 0 var(--wf-action-size, 34px);
  width: var(--wf-action-size, 34px);
  height: var(--wf-action-size, 34px);
  min-height: var(--wf-action-size, 34px);
  align-self: center;
  margin: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--wf-account-muted);
  font-size: 0;
  line-height: 1;
}
.wf-account .wf-account-action > * { display: none; }
.wf-account .wf-account-action::before {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: var(--wf-account-icon) center / contain no-repeat;
  content: "";
}
.wf-account-theme {
  --wf-account-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='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.5 1.5 0 0 1 1.1-2.5h1.1A4.3 4.3 0 0 0 21 11c0-4.5-4-8-9-8Z'/%3E%3Cpath d='M7.5 11h.01M10 7.5h.01M15 7.5h.01' stroke-width='2.6'/%3E%3C/svg%3E");
}
.wf-account-logout {
  --wf-account-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='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4m7 14 5-5-5-5M9 12h12'/%3E%3C/svg%3E");
}
body .wf-account[data-wf-module] :is(.wf-account-action:is(.wf-account-action, #af-theme-trigger, #b2b-theme-open, #cf-theme-open, #logout), .wf-account-open):hover {
  border-color: var(--wf-account-border);
  background: color-mix(in srgb, var(--wf-account-bg) 90%, var(--wf-account-text));
  color: var(--wf-account-text);
}
.wf-account :is(button, a):focus-visible, .wf-module-back:focus-visible {
  outline: 2px solid var(--wf-account-accent, #b7bec4);
  outline-offset: 2px;
}
body .wf-account .wf-account-menu.wf-account-menu {
  min-width: min(218px, calc(100vw - 26px));
  max-width: calc(100vw - 26px);
  padding: 5px;
  border: 1px solid var(--wf-account-border);
  border-radius: 9px;
  background: var(--wf-account-bg);
  color: var(--wf-account-text);
  box-shadow: 0 12px 26px #0006;
  animation: none;
}
.wf-account .wf-account-menu :is(a, button) {
  border-radius: 6px;
  background: transparent;
  color: var(--wf-account-text);
  padding: 8px 10px;
  text-align: start;
}
.wf-account .wf-account-menu :is(a, button):hover {
  background: color-mix(in srgb, var(--wf-account-bg) 85%, var(--wf-account-text));
}
.wf-account .wf-account-menu :is(.danger, #authBtn) { color: #ff9aaa !important; }
.wf-account .wf-account-menu .divider { background: var(--wf-account-border); }
.wf-account #user-avatar-placeholder {
  position: absolute;
  inset: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 32px;
  text-align: center;
}
a.wf-module-back { color: inherit; text-decoration: none; }
@media (max-width: 620px) {
  .wf-account { --wf-action-size: 40px; }
  body .wf-account[data-wf-module="workflow"] .wf-account-info { display: flex; max-width: 22vw; }
  body[data-wf-brand="1"] #dashboardView > header .wf-module-back { gap: 8px; }
  body[data-wf-brand="1"] #dashboardView > header .wf-module-back .wf { width: clamp(100px, 36vw, 154px); }
  body[data-wf-brand="1"] #dashboardView > header .wf-module-back .mk { height: 31px; }
}
