﻿:root {
  --navbar-link-hover: #47abfc;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.bg-still {
  background-color: #ffffffce !important;
}

.dark-mode .bg-still {
  background-color: #161616ce !important;
}

.animated-gradient {
  background: linear-gradient(-45deg, #47abfc, #a71fb4, #8b30bc);
  background-size: 200% 200%;
  animation: gradientFlow 2s ease infinite;
}

body.dark-mode .animated-gradient {
  background: linear-gradient(-45deg, #2d003e, #2e002f, #17001c);
  background-size: 200% 200%;
  animation: gradientFlow 2s ease infinite;
}

body.dark-mode {
  --navbar-link-hover: #ffffff;
}

.navbar-toggler:focus,
.navbar-toggler:active,
.nav-link:focus,
.nav-link:active,
.nav-link:focus-visible,
.btn:focus,
.btn:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.navbar .navbar-brand img {
  margin-left: 0 !important;
}

.navbar .row {
  display: flex;
  align-items: center;
  margin-left: 0;
  margin-right: 0;
  flex-wrap: nowrap;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

#themeToggle {
  display: flex;
  align-items: center;
  padding: 0 !important;
}
.navbar__actions .dropdown-menu {
  min-width: 14rem;
}
.navbar__color-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.navbar__color-menu {
  padding: 0;
  border: none;
  background: transparent;
}
.navbar__color-card {
  min-width: 220px;
  border: none;
}
.navbar__color-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 1rem 0;
}
body.dark-mode .navbar__color-divider {
  border-top-color: rgba(255, 255, 255, 0.15);
}
.navbar__color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 0.5rem;
}
.navbar__color-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  background-color: var(--navbar-swatch-color, #47abfc);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.navbar__color-swatch:hover,
.navbar__color-swatch:focus-visible {
  transform: scale(1.05);
  border-color: rgba(0, 0, 0, 0.35);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}
.navbar__color-swatch.is-active {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, 0.2);
}
body.dark-mode .navbar__color-swatch {
  border-color: rgba(255, 255, 255, 0.35);
}
body.dark-mode .navbar__color-swatch:hover,
body.dark-mode .navbar__color-swatch:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(22, 22, 22, 0.6);
}
body.dark-mode .navbar__color-swatch.is-active {
  box-shadow: 0 0 0 2px #161616, 0 0 0 4px rgba(255, 255, 255, 0.2);
}
.navbar__background-actions {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0.85rem;
  padding: 0.75rem;
}
body.dark-mode .navbar__background-actions {
  background: rgba(16, 16, 24, 0.8);
}
.navbar__background-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.navbar__background-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.navbar__background-preview {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(0, 0, 0, 0.25);
  background-image: var(--navbar-background-preview-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
body.dark-mode .navbar__background-preview {
  border-color: rgba(255, 255, 255, 0.35);
}
.navbar__background-preview.is-active {
  border-style: solid;
  box-shadow: 0 0 0 1px rgba(71, 171, 252, 0.6);
}
body.dark-mode .navbar__background-preview.is-active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body.dark-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23a400fc' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar .nav-link,
.navbar .navbutton {
  opacity: 0.35;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(1);
  font-weight: 100;
  color: inherit;
}

.navbar .nav-link:hover,
.navbar .navbutton:hover {
  opacity: 1;
  transform: scale(1.1);
  color: var(--navbar-link-hover) !important;
}

.navbar .navbutton.active-dropdown {
  font-weight: bold;
  background-color: transparent !important;
  transition: font-weight 0.3s ease, background-color 0.3s ease;
}

@media (max-width: 991.98px) {
  .dropdown-menu {
    left: auto !important;
    right: auto !important;
    text-align: center;
  }
  .navbar__color-dropdown .dropdown-menu {
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto;
  }
  .navbar .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 1rem;
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.15);
  }
  body.dark-mode .navbar .navbar-collapse {
    background-color: rgba(18, 18, 32, 0.9);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.65);
  }
  .navbar__actions {
    width: 100%;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
  .navbar__actions .nav-item {
    width: auto;
    margin-right: 0 !important;
    flex: 0 1 auto;
  }
  .navbar__actions .nav-link,
  .navbar__actions .dropdown-toggle {
    width: auto;
    min-width: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    background-color: rgba(255, 255, 255, 0.9);
  }
  body.dark-mode .navbar__actions .nav-link,
  body.dark-mode .navbar__actions .dropdown-toggle {
    border-color: rgba(255, 255, 255, 0.18);
    background-color: rgba(28, 28, 45, 0.85);
  }
  .navbar__actions .dropdown-menu:not(.navbar__color-menu) {
    text-align: left;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 0.85rem;
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.15);
  }
  body.dark-mode .navbar__actions .dropdown-menu:not(.navbar__color-menu) {
    background-color: rgba(18, 20, 35, 0.98);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.65);
  }
}

.dropdown-menu {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown.show .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0px);
}

.dropdown.show > .navbutton {
  background-color: #00babd !important;
  width: 100%;
  align-items: left;
  transition: background-color 0.3s ease, transform 0.3s ease;
  transform: scale(1.03);
  opacity: 1;
}

nav.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1050;
  transition: transform 0.3s ease-in-out;
}

#navbarSearch {
  border-radius: 999px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

@media (min-width: 992px) {
  .navbar {
    transition: none !important;
    max-height: 56px;
  }

  #navbarSearchForm {
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
  }
}

body {
  padding-top: var(--navbar-height);
}

@media (max-width: 991.98px) {
  .navbutton::before {
    content: " ";
    margin-right: 8px;
  }

  .dropdown.show > .navbutton::before {
    content: "👉🏼";
    margin-left: 8px;
  }

  .dropdown.show > .navbutton::after {
    content: "👈🏼";
    margin-left: 8px;
  }

  #imgdropdown::after {
    content: "👑";
    margin-left: 8px;
  }

  #imgdropdown::before {
    content: "👑";
    margin-right: 8px;
  }
}

.navbar-brand img {
  transition: transform 0.5s ease;
}

.navbar-brand:hover img {
  transform: scale(1.25);
}

.navbar:hover .nav-link,
.navbar:hover .navbutton,
.navbar:hover .dropdown button,
.navbar:hover .navbar-brand,
.navbar:hover .navbar-brand img {
  opacity: 1 !important;
}

#searchResultsDropdown.show {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0px) !important;
  pointer-events: auto;
}

@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0px) !important;
    pointer-events: auto;
  }

  .navbar .dropdown:hover > .navbutton {
    background-color: #00babd !important;
    transform: scale(1.03);
    opacity: 1;
  }
}

.truncate-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}

@media (max-width: 991.98px) {
  .mobile-nav-section {
    margin-top: 0.5rem;
  }
  .mobile-nav-section + .mobile-nav-section {
    margin-top: 0.25rem;
  }
  .mobile-nav-section .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0;
    opacity: 1 !important;
    transform: none !important;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12);
    padding: 0.25rem 0;
  }
  body.dark-mode .mobile-nav-section .dropdown-menu {
    background: rgba(20, 22, 36, 0.92);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.65);
  }
  .mobile-nav-section .dropdown-item {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    text-align: left;
  }
  .mobile-nav-section .dropdown-item.highlight {
    font-weight: 600;
  }
  .mobile-nav-section .dropdown-item.active {
    color: var(--sb-accent, #00babd);
    font-weight: 600;
  }
  .mobile-nav-section hr {
    margin: 0.35rem 0;
  }
}
