/* COMPONENTS — restored to original (from styles.css) */

/* Buttons base */
button {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* Hamburger Menu */
.hamburger-menu {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  position: relative;
}

/* Hit Box for Hamburger Menu */
.hamburger-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -12px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 1;
}

.hamburger-menu span {
  width: 20px;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background-color: #101594;
}

/* (Optional) burger animation class, якщо ти її використовуєш у JS */
.hamburger-menu.menu-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-menu.menu-open span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.menu-open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Brand */
.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-text {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.separator {
  color: #666;
  font-size: 1.2rem;
}

/* Notification button */
.notification-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

/* Hit Box for Notification Button */
.notification-btn::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 9999;
}

.notification-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #101594;
}

/* User Avatar (header) */
.user-avatar {
  width: 40px;
  height: 40px;
  background-color: #333;
  border-radius: 8px;
  border: 2px solid #555;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

/* Hit Box for User Avatar */
.user-avatar::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  width: 56px;
  height: 56px;
  cursor: pointer;
  z-index: 1;
}

.user-avatar:hover {
  border-color: #101594;
}

/* The avatar follows the shape chosen in the profile settings. */
.user-avatar[data-shape="circle"] { border-radius: 50%; }
.user-avatar[data-shape="square"] { border-radius: 8px; }

/* With a picture the image fills the whole box, edge to edge (no frame ring around it). */
.user-avatar.has-image {
  border-color: transparent;
  background-origin: border-box;
  background-clip: border-box;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.6);
}
.user-avatar.has-image:hover {
  border-color: transparent;
  box-shadow: 0 0 0 2px #101594;
}

/* Auth Button */
.auth-button {
  background-color: white;
  color: #000;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

/* Hit Box for Auth Button */
.auth-button::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  cursor: pointer;
  z-index: 1;
}

.auth-button:hover {
  background-color: #000;
  color: white;
  border: 1px solid white;
}

/* Login Notification */
.login-notification {
  position: fixed;
  top: 70px;
  right: 20px;
  background-color: #000000;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--surface-border, #333);
}

.login-notification.show {
  opacity: 1;
  pointer-events: auto;
}

/* Extended Menu Panel (Left) */
.extended-menu-panel {
  position: fixed;
  left: -290px;
  top: 60px;
  width: 290px;
  height: calc(100vh - 60px);
  background-color: #000000;
  border-right: 1px solid var(--surface-border, #333);
  z-index: 150;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.extended-menu-panel.active {
  left: 0;
}

.extended-menu-content {
  padding: 2rem 1.5rem;
}

.extended-menu-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: 1px solid var(--surface-border, #333);
  color: white;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.extended-menu-item:hover {
  color: #101594;
  border-color: #101594;
  background-color: rgba(16, 21, 148, 0.1);
}

/* Avatar Menu Panel (Right) */
.avatar-menu-panel {
  position: fixed;
  right: -290px;
  top: 60px;
  width: 290px;
  height: calc(100vh - 60px);
  background-color: #000000;
  border-left: 1px solid var(--surface-border, #333);
  z-index: 150;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}

.avatar-menu-panel.active {
  right: 0;
}

.avatar-menu-header {
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--surface-border, #333);
  color: white;
}

.avatar-menu-header:first-of-type {
  padding-top: 0.75rem;
}

.avatar-menu-content {
  padding: 0 1.5rem 2rem;
}

.avatar-menu-item {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.avatar-menu-item:hover {
  color: #101594;
}

.avatar-menu-divider {
  height: 1px;
  background-color: #333;
  margin: 12px 0.5rem;
}

/* Settings Menu Panel (Right) */
.settings-menu-panel {
  position: fixed;
  right: -290px;
  top: 60px;
  width: 290px;
  height: calc(100vh - 60px);
  background-color: #000000;
  border-left: 1px solid var(--surface-border, #333);
  z-index: 150;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}

.settings-menu-panel.active {
  right: 0;
}

.settings-menu-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-border, #333);
  color: white;
}

.settings-back-btn {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.settings-back-btn:hover {
  color: #101594;
}

.settings-menu-content {
  padding: 2rem 1.5rem;
}

/* Notification Panel */
.notification-panel {
  position: fixed;
  left: 0;
  top: -420px;
  width: 320px;
  height: 420px;
  background-color: #0a0a0a;
  border-bottom: 1px solid var(--surface-border, #333);
  border-right: 1px solid var(--surface-border, #333);
  border-radius: 0 0 12px 0;
  z-index: 150;
  transition: top 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-panel.active {
  top: 60px;
}

.notification-panel-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

/* Sidebar inner components */
.creator-avatar-placeholder {
  width: 40px;
  height: 40px;
  background-color: #333;
  border: 2px solid #555;
  border-radius: 8px;
  margin-top: -0.5rem;
  margin-left: 5px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

/* Hit Box for Creator Avatar */
.creator-avatar-placeholder::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  cursor: pointer;
  z-index: 1;
}

.creator-avatar-placeholder:hover {
  border-color: #101594;
  background-color: #444;
}

/* Sidebar Subscribed Creators List */
.sidebar-subs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-subs .creator-avatar-placeholder {
  margin-top: 0;
  margin-left: 5px;
}

/* Sidebar Explore Button */
.sidebar-explore-btn {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  max-width: 50px;
  max-height: 50px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  border: none;
  border-radius: 8px;
  margin-top: 3.3rem;
  margin-left: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.sidebar-explore-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* User info box */
.user-info-box {
  position: fixed;
  right: 20px;
  top: 70px;
  background: linear-gradient(145deg, #1b1b1b, #24282f);
  border: 1px solid #555;
  border-radius: 10px;
  padding: 12px 15px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-align: left;
  line-height: 1.4;
  min-width: 140px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.user-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.close-user-info {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  position: relative;
}

/* Hit Box for Close User Info Button */
.close-user-info::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1;
}

.close-user-info:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* HOME BUTTON — original look (left/top) */
.floating-home-btn {
  position: fixed;
  left: calc((var(--sidebar-w) - 50px) / 2);
  top: 95px;
  width: 50px;
  height: 50px;
  border: none;
  background: none;
  color: white;
  cursor: pointer;
  border-radius: 8px;
  z-index: 1500;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  opacity: 1;
}

.floating-home-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.floating-home-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Sidebar square buttons — match HOME button look */
.sidebar-content .sidebar-explore-btn,
.sidebar-content .sidebar-subs .creator-avatar-placeholder {
  width: 50px;
  height: 50px;
  border: none;
  background: none;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

/* НЕ чіпаємо .sidebar-content .creator-avatar-placeholder,
   бо це порожній div-плейсхолдер і він має бути видимим */

   /* Explore button hover – same as HOME */
.sidebar-explore-btn {
  background: none;
  border: none;
  border-radius: 8px;
  width: 50px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color 0.3s ease;
}

.sidebar-explore-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}


/* Moderator console button (under Explore, only for moderators with the console unlocked) */
.sidebar-mod-btn {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd27a;
  text-decoration: none;
  margin-top: -1rem; /* sits right under the Explore button (the bar's own gap is too big for a pair) */
  transition: background-color 0.3s ease;
}

.sidebar-mod-btn[hidden] { display: none; }
.sidebar-mod-btn:hover { background-color: rgba(255, 255, 255, 0.15); }

/* Modal (auth) — keep the “Modal Styles” version from styles.css */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #0a0a0a;
  color: #fff;
  padding: 28px;
  border-radius: 14px;
  width: 390px;
  border: 1px solid var(--surface-border, #333);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.modal-content .auth-title {
  margin: 0 0 14px 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="text"] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #111;
  color: #fff;
  outline: none;
}

/* Theme controls in avatar menu */
.avatar-theme-section {
  margin-bottom: 4px;
}

.avatar-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px 0 10px;
}

.avatar-theme-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--surface-border, #444);
  border-radius: 8px;
  color: #aaa;
  font-size: 12px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-theme-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.avatar-theme-btn.active {
  background: #101594;
  border-color: #101594;
  color: #fff;
}

.modal-content input[type="email"]::placeholder,
.modal-content input[type="password"]::placeholder,
.modal-content input[type="text"]::placeholder {
  color: #8a8a8a;
}

.modal-content .btn-login {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: #101594;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-content .btn-login:hover {
  background: #2735b5;
}

.modal-content .auth-subtext {
  text-align: center;
  color: #cfcfcf;
  font-size: 13px;
  margin: 14px 0 10px;
}

.modal-content .social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content .google-btn,
.modal-content .apple-btn,
.modal-content .x-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, opacity 0.2s ease;
}

.modal-content .google-btn { background-color: #db4437; color: #fff; }
.modal-content .apple-btn { background-color: #000; color: #fff; border: 1px solid var(--surface-border, #333); }
.modal-content .x-btn { background-color: #000; color: #fff; border: 1px solid var(--surface-border, #333); }

.modal-content .google-btn:hover,
.modal-content .apple-btn:hover,
.modal-content .x-btn:hover { opacity: 0.9; }

.modal-content .google-btn:active,
.modal-content .apple-btn:active,
.modal-content .x-btn:active { transform: scale(0.98); }

.auth-link {
  background: none;
  border: none;
  color: #8a8a8a;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  margin-top: 14px;
}

.auth-link:hover {
  color: #cfcfcf;
}

/* ===== Notifications ===== */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--surface-border, #333);
  flex-shrink: 0;
}

.notif-title {
  color: var(--text, #fff);
  font-size: 14px;
  font-weight: 600;
}

.notif-mark-read {
  background: none;
  border: none;
  color: #4f7cff;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.notif-mark-read:hover {
  text-decoration: underline;
}

.notif-list {
  padding: 4px 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  transition: background 0.15s;
  position: relative;
}

.notif-item:hover {
  background: rgba(255,255,255,0.04);
}

.notif-item--unread {
  background: rgba(79,124,255,0.05);
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-icon--subscriber { background: rgba(79,124,255,0.15); color: #4f7cff; }
.notif-icon--like       { background: rgba(255,80,80,0.15);  color: #ff5050; }
.notif-icon--comment    { background: rgba(80,200,120,0.15); color: #50c878; }
.notif-icon--payment    { background: rgba(255,180,0,0.15);  color: #ffb400; }

.notif-icon--info       { background: rgba(79,124,255,0.15); color: #4f7cff; }
.notif-icon--warn       { background: rgba(255,180,0,0.15);  color: #ffb400; }
.notif-icon--good       { background: rgba(80,200,120,0.15); color: #50c878; }
.notif-icon--bad        { background: rgba(255,80,80,0.15);  color: #ff5050; }

.notif-text--title { font-weight: 600; }
.notif-text--body {
  color: var(--text-muted, rgba(255,255,255,0.7));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notif-action {
  display: inline-block;
  margin: 2px 0 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: #4f7cff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.notif-action:hover { filter: brightness(1.1); }

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-text {
  color: var(--text, #fff);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 3px;
}

.notif-time {
  display: block;
  color: var(--text-muted, rgba(255,255,255,0.45));
  font-size: 11px;
}

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f7cff;
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted, rgba(255,255,255,0.4));
  font-size: 13px;
}

/* Badge on bell */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

/* Sidebar authors: initial letter when there is no avatar, a badge with the number of new posts */
.sidebar-author { padding: 0; color: #ddd; }
.sidebar-author--paid { border-color: #3a6df0; }
.sidebar-author-initial {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; pointer-events: none;
}
.sidebar-badge {
  position: absolute; top: -7px; right: -9px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid #111; pointer-events: none;
}
