/* =========================================================
   Gluoon icon-only sidebar (структура 1:1 як в gluoon-project)
   Кольори лишаються gluon-палітри (purple/navy)
   ========================================================= */

/* Контейнер-обгортка під layout sidebar+main */
.gluoon-app {
  min-height: 100vh;
  display: flex;
}

/* Бокова панель */
.gluoon-sidebar {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  overflow: visible;          /* щоб tooltip-и виходили за межі панелі */
  z-index: 1000;
  background: transparent;
}

/* Лого зверху */
.gluoon-sidebar__logo {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gluoon-sidebar__logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
}

.gluoon-sidebar__logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
  transition: transform 0.5s ease-in-out;
  position: relative;
  z-index: 2;
}

.gluoon-sidebar__logo a:hover .gluoon-sidebar__logo-img {
  transform: rotate(120deg) scale(1.05);
}

/* М'яке фіолетове сяйво за логотипом — у дусі gluon */
.gluoon-sidebar__logo::before {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(156, 39, 176, 0.55);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  filter: blur(12px);
  pointer-events: none;
  animation: gluoonLogoGlow 4s ease-in-out infinite;
}

@keyframes gluoonLogoGlow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

/* Контейнер навігаційної групи */
.gluoon-sidebar__nav {
  position: absolute;
  top: 110px;
  bottom: 110px;             /* лишаємо місце під футер з акаунтом/виходом */
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Внутрішній блок-«капсула» з рівномірним вертикальним розподілом
   іконок — росте під кількість пунктів, без фіксованої висоти */
.gluoon-sidebar__nav-inner {
  position: relative;
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 1.75rem 0;        /* більший зазор зверху і знизу */
  border-radius: 22px;
  background: rgba(106, 110, 174, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    6px 2px 4px rgba(5, 5, 10, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* SVG-фон більше не потрібен — лишаємо правило для зворотньої сумісності */
.gluoon-sidebar__nav-bg {
  display: none;
}

.gluoon-sidebar__nav-inner > * {
  position: relative;
  z-index: 1;
}

/* Кнопка / посилання панелі */
.gluoon-sidebar__btn {
  width: 44px;
  height: 44px;
  background-color: transparent;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #95a5a6;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  position: relative;
  text-decoration: none;
}

.gluoon-sidebar__btn i,
.gluoon-sidebar__btn svg {
  font-size: 1.15rem;
}

.gluoon-sidebar__btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ecf0f1;
}

/* Активний пункт — фірмовий фіолетовий gluon */
.gluoon-sidebar__btn--active {
  background-color: #9c27b0;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.55);
}

.gluoon-sidebar__btn--active:hover {
  background-color: #b143c4;
  color: #ffffff;
}

/* Tooltip-підказка справа від іконки (текст замість sidebar-text) */
.gluoon-sidebar__btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(26, 32, 44, 0.95);
  color: #f1f1f1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(156, 39, 176, 0.25);
  z-index: 1100;
}

.gluoon-sidebar__btn[data-tooltip]:hover::after,
.gluoon-sidebar__btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Спец-індикатор для admin-only пункту (корона) */
.gluoon-sidebar__btn--admin::before {
  content: '\f132';
  font-family: "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
  position: absolute;
  top: 3px;
  right: 4px;
  color: #ffd700;
  font-size: 0.55rem;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.55);
}

/* Футер sidebar (logout, account) */
.gluoon-sidebar__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Main контент поряд із sidebar */
main.gluoon-main {
  flex: 1;
  margin-left: 70px;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;          /* override base_layout.css `main { overflow:hidden }` */
  padding-bottom: 80px;
}

/* Коли користувач не авторизований — без offset */
.gluoon-app--guest > main.gluoon-main {
  margin-left: 0;
}

/* Прибираємо обмеження висоти, що ставив старий .content-wrapper */
body:has(.gluoon-app) {
  height: auto;
  overflow: auto;
}

/* Адаптивність */
@media (max-width: 768px) {
  .gluoon-sidebar {
    width: 60px;
  }
  .gluoon-main {
    margin-left: 60px;
  }
  .gluoon-sidebar__btn[data-tooltip]::after {
    display: none;
  }
}
