/*
 * StreamFlow v2.2 - Live Streaming Lewat VPS
 * 
 * Custom Features & UI Components
 * Created by: Mpratama
 * GitHub: https://github.com/mpratama

 * © 2026 Mpratama - All rights reserved
 */

@font-face {
  font-family: 'tabler-icons';
  src: url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.30.0/fonts/tabler-icons.woff2') format('woff2');
  font-display: block;
  font-weight: normal;
  font-style: normal;
}

.ti {
  font-family: 'tabler-icons' !important;
  visibility: visible !important;
  opacity: 1;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */
.sidebar-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  margin: 0 auto;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 0.75rem;
  transition: all 200ms ease;
  cursor: pointer;
}

.sidebar-icon:hover {
  background: linear-gradient(135deg, var(--sf-accent-1, #7c3aed) 0%, var(--sf-accent-2, #a855f7) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.sidebar-tooltip {
  position: absolute;
  width: auto;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem;
  min-width: max-content;
  left: 5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  color: white;
  background: rgba(25, 15, 45, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 100ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0);
  transform-origin: left;
}

.sidebar-icon:hover .sidebar-tooltip {
  transform: scale(1);
}

/* ========================================
   BOTTOM NAVIGATION (Mobile)
   ======================================== */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  transition: color 200ms ease;
}

.bottom-nav-item i {
  font-size: 22px;
  margin-bottom: 4px;
}

.bottom-nav-item span {
  font-size: 11px;
}

.bottom-nav-item:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   PROFILE DROPDOWN POSITIONING
   ======================================== */
#profile-dropdown {
  position: fixed;
  z-index: 100;
  min-width: 220px;
  transition: all 200ms ease;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  width: auto;
  bottom: 80px;
  left: 15px;
}

#profile-dropdown.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  display: block !important;
  visibility: hidden;
}

@media (max-width: 768px) {
  #profile-dropdown {
    min-width: 200px;
    right: 20px;
    left: auto;
    bottom: auto;
    top: 100px;
  }
}

/* ========================================
   SERVER TIME DISPLAY
   ======================================== */
#server-clock, #mobile-server-clock {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 550px) {
  #mobile-server-time {
    display: flex !important;
  }
  #mobile-separator {
    display: block !important;
  }
}

@media (min-width: 1024px) {
  #mobile-server-time {
    display: none !important;
  }
  #mobile-separator {
    display: none !important;
  }
}

/* ========================================
   MOBILE POPUP STATES
   ======================================== */
@media (max-width: 1023px) {
  body {
    padding-top: 16px;
  }
  
  .min-h-screen {
    padding-bottom: 80px !important;
  }
  
  #mobile-profile-popup.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

#mobile-notification-popup.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

#mobile-notification-popup {
  z-index: 100;
  transition: opacity 300ms, transform 300ms, visibility 300ms;
  display: block !important;
  visibility: hidden;
}

#mobile-notification-popup.hidden {
  display: none !important;
}

/* ========================================
   SAWERIA DONATE BUTTON
   ======================================== */
.saweria-button {
  position: relative;
  border-radius: 6px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  transition: all 200ms ease;
}

.saweria-button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000000;
}

.saweria-button:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000000;
}

.saweria-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms, visibility 300ms, transform 300ms;
  transform: translateY(5px);
  z-index: 50;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.saweria-button:hover .saweria-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-arrow {
  position: absolute;
  bottom: -6px;
  right: 10px;
  width: 12px;
  height: 12px;
  background-color: white;
  transform: rotate(45deg);
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal-overlay {
  backdrop-filter: blur(4px);
  transition: opacity 200ms ease-in-out;
}

.modal-container {
  transform: scale(0.95);
  opacity: 0;
  transition: all 200ms ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
  opacity: 1;
}

/* ========================================
   VIDEO ORIENTATION BUTTONS
   ======================================== */
[onclick^="setVideoOrientation"] {
  position: relative;
  overflow: hidden;
}

[onclick^="setVideoOrientation"]:before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sf-accent-1, #7c3aed);
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

[onclick^="setVideoOrientation"].bg-primary:before {
  opacity: 0.1;
}

[onclick^="setVideoOrientation"]:hover:before {
  opacity: 0.05;
}

[onclick^="setVideoOrientation"] i {
  transition: transform 200ms ease-in-out;
}

[onclick^="setVideoOrientation"]:active i {
  transform: scale(0.9);
}

/* ========================================
   CUSTOM SCROLLBAR (Legacy support)
   ======================================== */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(124, 58, 237, 0.1);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 4px;
  transition: background 200ms ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.3) rgba(124, 58, 237, 0.1);
}

/* ========================================
   SPIN ANIMATION
   ======================================== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ti.animate-spin {
  animation: spin 1s linear infinite !important;
  display: inline-block;
}

/* ========================================
   MOBILE RESPONSIVE FIXES
   ======================================== */
@media (max-width: 768px) {
  .modal-container {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-form-group {
    margin-bottom: 1rem;
  }
  
  .modal-input {
    padding: 0.75rem;
    font-size: 16px;
  }
}

/* ========================================
   LEGACY COLOR SUPPORT
   ======================================== */
.text-logout {
  color: #ef4444;
}

.text-logout:hover {
  color: #f87171;
}