/**
 * Sociq Bottom Navigation & Mobile Quick Actions (v20261031.8)
 */
@media (min-width: 768px) {
  .sociq-bottom-nav,
  .sociq-quick-create-sheet {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .sociq-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(14, 18, 27, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .sociq-bottom-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #8b949e;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .sociq-bottom-item:active {
    transform: scale(0.92);
  }

  .sociq-bottom-item.active {
    color: #818cf8;
  }

  .sociq-bottom-item i {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 3px;
    transition: transform 0.15s;
  }

  .sociq-bottom-item.active i {
    transform: scale(1.1);
    color: #6366f1;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
  }

  .sociq-bottom-item .bottom-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid transparent;
    margin-bottom: 2px;
  }

  .sociq-bottom-item.active .bottom-avatar {
    border-color: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  }

  .sociq-bottom-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #0e121b;
  }

  /* Center Floating Create (+) Button */
  .sociq-bottom-create-btn {
    position: relative;
    top: -12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
    border: 3px solid #0e121b;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .sociq-bottom-create-btn:active {
    transform: scale(0.9) rotate(45deg);
  }

  /* Quick Create Action Sheet Modal */
  .sociq-quick-create-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    align-items: flex-end;
  }

  .sociq-quick-create-sheet.open {
    display: flex;
  }

  .sociq-sheet-content {
    background: #161b26;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    width: 100%;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .sociq-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 16px;
  }

  .sociq-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 16px;
    text-align: center;
  }

  .sociq-sheet-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sociq-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #f0f6fc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    transition: background 0.15s;
  }

  .sociq-sheet-item:hover, .sociq-sheet-item:active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
  }

  .sociq-sheet-item i {
    font-size: 26px;
    color: #6366f1;
  }
}

/* ============================================================
   Desktop Horizontal Navigation & "More" Dropdown Menu (v20261031.11)
   ============================================================ */
@media (min-width: 992px) {
  header ul.nav[data-target="horizontal"] {
    gap: 4px !important;
    padding: 0 8px !important;
  }

  header ul.nav[data-target="horizontal"] > li {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 13px !important;
  }

  header ul.nav[data-target="horizontal"] > li > a {
    width: 42px !important;
    height: 42px !important;
    font-size: 17px !important;
  }

  /* Reset for items inside the "More" dropdown */
  header ul.nav[data-target="horizontal"] .horizontal-more-item {
    position: relative !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 250px !important;
    max-height: 480px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(35, 42, 64, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16) !important;
    z-index: 1050 !important;
    display: none;
    margin: 0 !important;
    list-style: none !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu.show {
    display: block !important;
    animation: sociqMenuFade 0.18s ease-out forwards;
  }

  @keyframes sociqMenuFade {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }

  html[data-bs-theme="dark"] header ul.nav[data-target="horizontal"] .horizontal-more-menu {
    background: #181d28 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu li {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    flex: initial !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu li::after {
    display: none !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item {
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    gap: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-bs-theme="dark"] header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item {
    color: #cbd5e1 !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item i {
    font-size: 16px !important;
    width: 20px !important;
    text-align: center !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item:hover,
  header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item:focus {
    background: rgba(102, 88, 219, 0.12) !important;
    color: #6658db !important;
    transform: none !important;
  }

  html[data-bs-theme="dark"] header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item:hover,
  html[data-bs-theme="dark"] header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #c5bcff !important;
  }

  header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-divider {
    margin: 6px 0 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  html[data-bs-theme="dark"] header ul.nav[data-target="horizontal"] .horizontal-more-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
}
