/*
 * Vibeforge visual system overrides
 * Loaded after runtime theme customization in _head.tpl.
 */

:root {
  --vf-ui-accent: var(--vf-accent, var(--link-color, #4c6fff));
  --vf-ui-accent-strong: var(--vf-accent-strong, #2f4dff);
  --vf-ui-surface: var(--vf-surface, #ffffff);
  --vf-ui-surface-alt: var(--vf-surface-alt, #f5f7fb);
  --vf-ui-border: var(--vf-border, rgba(15, 23, 42, 0.08));
  --vf-ui-border-strong: var(--vf-border-strong, rgba(15, 23, 42, 0.18));
  --vf-ui-shadow-sm: var(--vf-shadow-sm, 0 10px 24px rgba(15, 23, 42, 0.1));
  --vf-ui-shadow-md: var(--vf-shadow-md, 0 18px 40px rgba(15, 23, 42, 0.14));
  --vf-ui-radius: var(--vf-radius-lg, 18px);
  --vf-chat-sidebar-width: 92px;
  --vf-chat-sidebar-gap: 12px;
}

body.n_activated,
body.n_live {
  --vf-chat-sidebar-top: 120px;
}

body {
  --vf-chat-sidebar-top: 70px;
}

.main-wrapper .main-header {
  border-bottom-color: var(--vf-ui-border);
}

/* Sidebar polish */
.main-side-nav-card {
  overflow: hidden;
}

.main-side-nav-card .card-body.with-nav {
  padding: 14px 12px;
}

.sidebar-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b !important;
}

.sidebar-section-heading:hover,
.sidebar-section-heading:focus {
  background: rgba(76, 111, 255, 0.08);
  color: #334155 !important;
  text-decoration: none;
}

.sidebar-section-label {
  font-size: 0.72rem;
  text-transform: none;
}

.main-side-nav > li > a,
.side-nav > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 12px;
}

/* Composer polish */
.composer-launcher {
  border: 1px solid var(--vf-ui-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow: var(--vf-ui-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.composer-launcher:hover {
  transform: translateY(-1px);
  border-color: var(--vf-ui-border-strong);
  box-shadow: var(--vf-ui-shadow-md);
}

.composer-launcher-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.composer-launcher-input {
  color: #475569;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.night-mode .composer-launcher {
  background: linear-gradient(180deg, rgba(20, 29, 43, 0.95), rgba(15, 24, 36, 0.95));
  border-color: var(--card-dark-divider);
}

body.night-mode .composer-launcher-input {
  color: #b5c5d8;
}

/* Unified feed promo cards */
.vf-promo-card {
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 46%, #0ea5e9 100%) !important;
  color: #f8fbff;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.28);
}

.vf-promo-card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.vf-promo-card .user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.vf-promo-card .user-box:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.vf-promo-card .user-box img {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.vf-promo-card .user-box .name {
  font-weight: 700;
  line-height: 1.2;
}

/* Profile polish */
.vf-profile-shell .profile-header {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--vf-ui-border);
  box-shadow: var(--vf-ui-shadow-md);
}

.vf-profile-shell .post .post-image img,
.vf-profile-shell .post .photos img,
.vf-profile-shell .post img.img-fluid,
.vf-profile-shell .post-image img,
.vf-profile-shell .post-media img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.vf-profile-shell .post .post-image,
.vf-profile-shell .post .photos,
.vf-profile-shell .post-media {
  width: 100%;
  overflow: hidden;
}

.vf-profile-shell .profile-cover-wrapper {
  min-height: clamp(220px, 32vw, 360px);
}

.vf-profile-shell .profile-cover-wrapper img {
  display: block;
}

.vf-profile-shell .profile-name-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 8px;
}

.vf-profile-shell .profile-name-wrapper > a:first-of-type {
  font-size: clamp(1.3rem, 1.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.vf-profile-shell .profile-name-wrapper .text-muted {
  font-size: 0.95rem;
  font-weight: 600;
}

.vf-profile-shell .profile-buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 18px;
}

.vf-profile-shell .profile-buttons-wrapper .btn {
  box-shadow: none;
}

.profile-name-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 0.35rem;
  flex-shrink: 0;
}

.profile-name-flag.profile-name-flag-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.profile-name-flag.profile-name-flag-swatch {
  width: 1.35rem;
  height: 0.95rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 2px 10px rgba(15, 23, 42, 0.18);
  background-size: cover;
  background-repeat: no-repeat;
}

.profile-avatar-wrapper.avatar-frame-gold img {
  border: 4px solid #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.profile-avatar-wrapper.avatar-frame-silver img {
  border: 4px solid #c0c0c0;
  box-shadow: 0 0 0 3px rgba(192, 192, 192, 0.3);
}

.profile-avatar-wrapper.avatar-frame-rainbow img {
  border: 4px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #b983ff);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

.profile-avatar-wrapper.avatar-frame-neon img {
  border: 4px solid #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.75), 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.profile-featured-song {
  margin-top: 2px;
  font-size: 0.92rem;
  color: #64748b;
}

body.night-mode .vf-profile-shell .profile-name-wrapper > a:first-of-type {
  color: #f8fafc;
}

body.night-mode .profile-featured-song {
  color: #9cb0c6;
}

/* Chat sidebar responsive shell */
.chat-sidebar {
  right: var(--vf-chat-sidebar-gap);
  top: var(--vf-chat-sidebar-top);
  bottom: 14px;
  width: var(--vf-chat-sidebar-width);
}

.chat-sidebar-shell {
  display: flex;
  flex-direction: column;
}

.chat-sidebar-content {
  top: 14px;
  bottom: 86px;
  left: 8px;
  width: calc(100% - 16px);
}

.chat-sidebar-content .js_scroller {
  padding-bottom: 6px;
}

.chat-sidebar-footer {
  bottom: 10px;
  left: 50%;
  width: calc(100% - 20px);
  max-width: 64px;
  transform: translateX(-50%);
}

.chat-sidebar-shell .chat-sidebar-footer a.btn-chat {
  top: 0;
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  :root {
    --vf-chat-sidebar-width: 84px;
  }

  .chat-sidebar-content {
    left: 7px;
    width: calc(100% - 14px);
  }
}

@media (max-width: 1199.98px) {
  .chat-sidebar {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .main-side-nav-card .card-body.with-nav {
    padding: 10px;
  }

  .vf-profile-shell .profile-name-wrapper,
  .vf-profile-shell .profile-buttons-wrapper {
    padding-left: 14px;
    padding-right: 14px;
  }
}
