/* Shared surface, type and focus styles for the signed-in shell and public feed. */
:root {
  color-scheme: dark;
  --vc-bg: #101116;
  --vc-chrome: #15161d;
  --vc-panel: #191a21;
  --vc-raised: #22232c;
  --vc-border: #343640;
  --vc-text: #f4f3f9;
  --vc-muted: #b4b4c3;
  --vc-accent: #c5afff;
  --vc-accent-bg: #31283f;
  --vc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --velchat-safe-bg: var(--vc-bg);
  --velchat-safe-surface: var(--vc-panel);
  --velchat-safe-surface-2: #202129;
  --velchat-safe-surface-3: var(--vc-raised);
  --velchat-safe-border: var(--vc-border);
  --velchat-safe-border-soft: #30313a;
  --velchat-safe-text: var(--vc-text);
  --velchat-safe-muted: var(--vc-muted);
  --header-background: var(--vc-chrome);
  --header-search-color: var(--vc-raised);
  --header-color: var(--vc-text);
  --body-bg: var(--vc-bg);
  --vc-mobile-bar: calc(58px + env(safe-area-inset-bottom, 0px));
}
body { font-family: var(--vc-font); }
body :is(a, button, input, select, textarea, [tabindex], [contenteditable]):focus-visible {
  outline: 2px solid var(--vc-accent) !important;
  outline-offset: 2px;
}
body header, body header nav.navbar, body header .tag_header, body header nav .container-fluid {
  background: var(--vc-chrome) !important;
}
body header .tag_header_shadow { display: none; }
body header .tag_toggle_sidebar,
body header .tag_toggle_search {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--vc-muted);
}
body header .header-brand img:is(.tag_logo_pc, .tag_logo_mobi) {
  max-width: 136px !important;
  max-height: 32px !important;
  height: auto;
}
body header .header-brand {
  flex: 0 0 auto;
  line-height: 1;
}
body header .tag_header { gap: 10px; }
body header .tag_header .search-input {
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--vc-border) !important;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  color: var(--vc-text);
  text-overflow: ellipsis;
}
body header .tag_header .search-input::placeholder { opacity: 1; }
body header .tag_header .search-input:focus {
  border-color: var(--vc-accent) !important;
  outline-offset: 1px;
}
body header .tag_hdr_right { gap: 4px; }
body header .tag_hdr_right > .dropdown { margin: 0; }
body header .tag_hdr_droptoggle,
body header .tag_navbar_top_right .tag_hdr_user_droptoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--vc-muted) !important;
}
body header .tag_hdr_droptoggle::before { display: none; }
body header .tag_hdr_user_droptoggle img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
}
body header .show > .tag_hdr_droptoggle,
body header .tag_hdr_droptoggle[aria-expanded="true"] {
  background: var(--vc-accent-bg);
  color: var(--vc-accent) !important;
}
body header .new-update-alert {
  top: 0;
  right: 0;
  min-width: 16px;
  height: auto;
  line-height: 16px;
  padding: 0 4px;
  border: 1px solid var(--vc-chrome);
  background: #b62d50;
  color: #fff;
  font: 650 10px/16px var(--vc-font);
}
body header .vc-search-status { padding: 12px 6px; color: var(--vc-muted); }
body header .vc-search-retry {
  min-height: 44px;
  padding-inline: 12px;
  background: var(--vc-raised);
  color: var(--vc-accent);
  border: 1px solid var(--vc-border);
  border-radius: 10px;
}
body .tag_create_dropup > .btn {
  display: grid;
  place-items: center;
  width: 52px;
  min-width: 52px;
  height: 52px;
  background: #bda1ff !important;
  color: #231834 !important;
  border-radius: 16px;
  box-shadow: 0 4px 14px #090a1066;
}
body .tag_create_dropup > .dropdown-menu {
  border: 1px solid var(--vc-border);
  border-radius: 16px;
}
body .tag_create_dropup > .dropdown-menu::before { display: none; }
body .tag_create_menu > li > a { line-height: 30px; }
body .tag_create_menu > li > a svg { color: var(--vc-muted); }
body .barloading { background-color: var(--vc-accent); }
#vc-navigation-status:not([hidden]) {
  position: fixed;
  z-index: 1050;
  inset-inline: 12px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: max-content;
  max-width: min(480px, calc(100vw - 24px));
  padding: 8px 8px 8px 16px;
  margin: 0 auto;
  background: var(--vc-raised);
  color: var(--vc-text);
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  box-shadow: 0 8px 25px #0005;
}
#vc-navigation-status a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 9px;
  background: var(--vc-accent-bg);
  color: var(--vc-accent);
}
@media (hover: hover) {
  body header .tag_hdr_droptoggle:hover,
  body header .tag_toggle_sidebar:hover,
  body header .tag_toggle_search:hover {
    background: var(--vc-raised);
    color: var(--vc-text) !important;
  }
  body .tag_create_dropup > .btn:hover { background: #cebbff !important; }
}

/* The top and side header variants use different desktop anchoring. */
@media (min-width: 769px) {
  body header .tag_navbar_top {
    box-shadow: inset 0 -1px var(--vc-border) !important;
  }
  body header .tag_navbar_top_right .tag_hdr_right {
    height: 56px;
    padding: 0 18px;
  }
  body header .tag_navbar_top .tag_header > .search-container {
    width: min(31vw, 430px);
    margin-inline-start: 12px;
    margin-inline-end: auto;
    min-width: 0;
  }
  body header .tag_navbar_top_right .tag_hdr_user_droptoggle {
    background: var(--vc-raised);
    border-color: var(--vc-border);
    padding: 3px 5px;
    margin-inline-start: 6px;
  }
  body header .tag_navbar_top_right .tag_hdr_user_droptoggle span {
    padding-inline: 5px 9px;
    max-width: 135px;
  }
  body header .tag_navbar_top_right .tag_hdr_right > .dropdown .dropdown-menu,
  body header .tag_navbar_top .tag_header > .search-container .dropdown-menu {
    border: 1px solid var(--vc-border);
    border-radius: 16px;
  }
}
@media (min-width: 1351px) {
  body:not(.tag_header_top_p) header .header-brand img.tag_logo_pc { max-width: 104px !important; }
}
@media (min-width: 769px) and (max-width: 1350px) {
  body:not(.tag_header_top_p) header nav.navbar { box-shadow: inset 0 -1px var(--vc-border) !important; }
  body:not(.tag_header_top_p) header .tag_hdr_right {
    left: auto; right: auto;
    inset-inline-end: 8px;
    width: auto;
    height: 60px;
    padding: 0;
  }
  body:not(.tag_header_top_p) header nav .tag_header { padding-inline-end: 210px; }
  body:not(.tag_header_top_p) header nav .search-container { max-width: 430px; }
}

/* WoWonder renders Home and the account actions in separate fixed elements. */
@media (max-width: 768px) {
  body:has(.tag_sec_toolbar) { padding-bottom: var(--vc-mobile-bar) !important; }
  body:has(header .tag_hdr_right) { --vc-home-width: 20%; }
  body:has(header .tag_hdr_right.flex-end) { --vc-home-width: 50%; }
  body header nav.navbar {
    border-bottom: 1px solid var(--vc-border);
    min-height: 52px;
    padding-block: 4px;
  }
  body header .tag_header { gap: 6px; }
  body header .header-brand { display: inline-flex; align-items: center; }
  body header .header-brand img.tag_logo_mobi {
    display: block;
    max-width: clamp(90px, 25vw, 116px) !important;
    max-height: 27px !important;
  }
  body header .tag_header > .search-container { min-width: 0; flex: 1; }
  body header .tag_header .search-input { font-size: 16px; }
  body .tag_sec_toolbar {
    height: var(--vc-mobile-bar);
    padding: 2px 0 env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--vc-border);
    background: var(--vc-chrome);
  }
  body .tag_sec_toolbar > div { width: var(--vc-home-width, 20%); height: 54px; }
  body .tag_sec_toolbar #home_nav_sec { width: 100%; }
  body .tag_sec_toolbar a,
  body header .tag_hdr_right .tag_hdr_droptoggle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 3px;
    background: transparent;
    border: 0;
    border-radius: 10px;
    line-height: 1;
    color: var(--vc-muted) !important;
  }
  body .tag_sec_toolbar a::after,
  body header .tag_hdr_right .tag_hdr_droptoggle::after {
    content: attr(aria-label);
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
    font: 550 10px/13px var(--vc-font);
    letter-spacing: .01em;
  }
  body header .tag_hdr_right,
  body header .tag_navbar_top_right .tag_hdr_right {
    left: auto; right: auto;
    inset-inline: var(--vc-home-width, 20%) 0;
    width: auto;
    top: auto;
    bottom: env(safe-area-inset-bottom, 0px);
    height: 56px;
    padding: 0;
    margin: 0;
    gap: 0;
  }
  body header .tag_hdr_right > .dropdown {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 2px;
  }
  body header .tag_hdr_right .new-update-alert { right: 18%; top: 0; }
  body header .tag_hdr_droptoggle svg,
  body .tag_sec_toolbar a svg { width: 22px; height: 22px; }
  body header .tag_hdr_right .tag_hdr_user_droptoggle img { width: 24px; height: 24px; }
  body .tag_sec_toolbar .active a,
  body header .tag_hdr_right .show > .tag_hdr_droptoggle {
    color: var(--vc-accent) !important;
  }
  body header .tag_hdr_right > .dropdown > .dropdown-menu,
  body header .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu {
    left: 0; right: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    top: 0;
    bottom: var(--vc-mobile-bar);
    height: auto;
    max-height: none;
    padding: 16px 14px;
    border-radius: 0;
  }
  #vc-navigation-status:not([hidden]),
  body .tag_pub_upload_toast,
  body .tag_vel_toast { bottom: calc(var(--vc-mobile-bar) + 10px); }
}
body header .search-container.has-query .wow_htag {display: none;}
body header .vc-native-search #navbar-searchbox {position: relative;}
body header .vc-native-search .vc-search-submit {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--vc-muted);
}
body header .vc-native-search #navbar-searchbox .vc-search-submit svg {
  display: block;
  position: static;
  width: 21px;
  height: 21px;
  opacity: 1;
  transform: none;
  color: inherit;
}
body header .vc-native-search #navbar-searchbox .search-input {padding-inline-start: 40px;}
@media (max-width: 768px) {
  body header .tag_header > .vc-native-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    inset: auto;
    flex: 0 1 auto;
    width: clamp(124px, 42vw, 196px);
    min-width: 104px;
    margin: 0 0 0 auto;
  }
  html[dir="rtl"] body header .tag_header > .vc-native-search {order: -1;}
  body header .vc-native-search #navbar-searchbox {
    display: flex;
    align-items: stretch;
    direction: ltr;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    float: none;
    overflow: visible;
    border-radius: 22px;
    background: var(--vc-raised);
    box-shadow: inset 0 0 0 1px var(--vc-border);
  }
  body header .vc-native-search #navbar-searchbox:focus-within {
    box-shadow: inset 0 0 0 2px var(--vc-accent);
  }
  body header .vc-native-search #navbar-searchbox .search-input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 2px 0 12px;
    border: 0 !important;
    border-radius: 22px;
    background: transparent;
    color: var(--vc-text);
    font: 500 16px/normal var(--vc-font);
    transition: none;
  }
  body header .vc-native-search #navbar-searchbox .search-input::placeholder {opacity: 1;color: var(--vc-muted);}
  body header .vc-native-search #navbar-searchbox .vc-search-submit {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    color: var(--vc-accent);
    touch-action: manipulation;
  }
  body header .tag_header > .vc-native-search .search-dropdown-container:not(.show) {display: none;}
  body header .tag_header > .vc-native-search .search-dropdown-container.show {
    display: block;
    position: absolute;
    inset: calc(100% + 4px) 0 auto auto;
    width: min(360px, calc(100vw - 32px));
    min-width: 0;
    height: auto;
    max-height: min(46vh, 360px);
    max-height: min(46dvh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--vc-border);
    border-radius: 14px;
    background: var(--vc-chrome);
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
    z-index: 2;
  }
  body header .vc-native-search .search-dropdown-result {max-height: none;overflow: visible;}
  body header .vc-native-search .search-dropdown-result a,
  body header .vc-native-search .search-advanced-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding-inline: 12px;
    color: var(--vc-text);
  }
  body header .vc-native-search .search-user-name,
  body header .vc-native-search .search-advanced-link {overflow-wrap: anywhere;}

  /* Expanded WoWonder headers include a back button. Keep the field and button
     on one row and let the available space below that row determine the list. */
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) {
    display: grid;
    grid-template: "back field" auto "results results" minmax(0, 1fr) / 44px minmax(0, 1fr);
    align-content: start;
    gap: 4px;
    position: fixed;
    inset: 0;
    z-index: 1045;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    height: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(10px, env(safe-area-inset-left));
    background: var(--vc-chrome);
  }
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) > .tag_toggle_search {
    grid-area: back;
    display: grid;
    place-items: center;
    position: static;
  }
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) > #navbar-searchbox {
    grid-area: field;
    position: relative;
    float: none;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    transition: none;
  }
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) .search-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: 16px;
  }
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) > .search-dropdown-container {
    grid-area: results;
    display: block;
    /* Bootstrap can add inline Popper placement relative to the header. */
    position: static !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 8px 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
  body header .tag_header > .search-container:not(.vc-native-search):is(.show, .open) .search-dropdown-result {
    max-height: none;
    overflow: visible;
  }
}
@media (prefers-reduced-motion: reduce) {
  body :is(.barloading, .skel, .tag_content, .tag_hdr_droptoggle, .tag_create_dropup),
  body .skel::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
