/* ========================================
   DRAWER MENU STYLES - Lalitpur Live TV
   Modern Mobile-Responsive Sliding Drawer
   ======================================== */

/* Hamburger Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn:hover {
  transform: scale(1.1);
}

.hamburger-btn:active span {
  background: #fbbf24;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }
  
  /* Hide old profile dropdown on mobile */
  .profile-dropdown {
    display: none !important;
  }
}

/* Dark Overlay */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.drawer-overlay.active,
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer Menu Container */
.drawer-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-menu.open,
.drawer-menu.active {
  right: 0;
}

/* Drawer Header */
.drawer-header {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.drawer-logo h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.drawer-logo p {
  color: #fecaca;
  font-size: 11px;
  font-weight: 500;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.drawer-close:active {
  transform: rotate(90deg) scale(0.95);
}

/* Drawer Content */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

.drawer-content::-webkit-scrollbar {
  width: 6px;
}

.drawer-content::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.drawer-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* User Section */
.drawer-user-section {
  padding: 20px;
  background: linear-gradient(to bottom, #fef2f2 0%, #ffffff 100%);
  border-bottom: 1px solid #fee2e2;
}

/* User Card (Logged In) */
.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.drawer-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
  border: 3px solid #fff;
}

.drawer-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
}

.drawer-user-info h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #3b82f6;
  font-weight: 600;
}

.drawer-view-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 2px solid #dc2626;
  border-radius: 10px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.drawer-view-profile-btn:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Auth Buttons (Not Logged In) */
.drawer-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.drawer-btn-primary {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.drawer-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.drawer-btn-secondary {
  background: #fff;
  color: #dc2626;
  border: 2px solid #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.1);
}

.drawer-btn-secondary:hover {
  background: #fef2f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Drawer Sections */
.drawer-section {
  padding: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.drawer-section-bottom {
  border-bottom: none;
  background: #f8fafc;
}

/* Navigation Items */
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 52px;
}

.drawer-nav-item:hover {
  background: #fef2f2;
  color: #dc2626;
  transform: translateX(4px);
}

.drawer-nav-item:active {
  transform: translateX(4px) scale(0.98);
}

.drawer-nav-item svg {
  flex-shrink: 0;
  stroke-width: 2.5;
}

.drawer-nav-item-danger {
  color: #dc2626;
}

.drawer-nav-item-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Dark Mode Toggle */
.drawer-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.drawer-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
}

.drawer-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.drawer-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.drawer-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  transition: 0.3s;
  border-radius: 28px;
}

.drawer-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drawer-toggle-switch input:checked + .drawer-toggle-slider {
  background: #dc2626;
}

.drawer-toggle-switch input:checked + .drawer-toggle-slider:before {
  transform: translateX(24px);
}

/* Language Selector */
.drawer-language-selector {
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.drawer-language-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.drawer-lang-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-lang-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

.drawer-lang-btn.active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Dark Mode Styles */
body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .drawer-menu {
  background: #1e293b;
}

body.dark-mode .drawer-content::-webkit-scrollbar-track {
  background: #0f172a;
}

body.dark-mode .drawer-content::-webkit-scrollbar-thumb {
  background: #475569;
}

body.dark-mode .drawer-user-section {
  background: linear-gradient(to bottom, #1e293b 0%, #1e293b 100%);
  border-bottom-color: #334155;
}

body.dark-mode .drawer-section {
  border-bottom-color: #334155;
}

body.dark-mode .drawer-section-bottom {
  background: #0f172a;
}

body.dark-mode .drawer-section-title {
  color: #94a3b8;
}

body.dark-mode .drawer-nav-item {
  color: #cbd5e1;
}

body.dark-mode .drawer-nav-item:hover {
  background: #334155;
  color: #fbbf24;
}

body.dark-mode .drawer-toggle-item,
body.dark-mode .drawer-language-selector {
  background: #334155;
}

body.dark-mode .drawer-toggle-label {
  color: #cbd5e1;
}

body.dark-mode .drawer-lang-btn {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
}

body.dark-mode .drawer-lang-btn:hover {
  background: #334155;
  border-color: #dc2626;
  color: #fbbf24;
}

body.dark-mode .drawer-lang-btn.active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

body.dark-mode .drawer-user-info h3 {
  color: #f1f5f9;
}

body.dark-mode .drawer-view-profile-btn {
  background: #334155;
  border-color: #fbbf24;
  color: #fbbf24;
}

body.dark-mode .drawer-view-profile-btn:hover {
  background: #fbbf24;
  color: #0f172a;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .drawer-menu {
    width: 90%;
  }
  
  .drawer-header {
    padding: 16px;
  }
  
  .drawer-logo h2 {
    font-size: 16px;
  }
  
  .drawer-logo p {
    font-size: 10px;
  }
  
  .drawer-user-avatar {
    width: 48px;
    height: 48px;
  }
  
  .drawer-user-info h3 {
    font-size: 15px;
  }
  
  .drawer-nav-item {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 48px;
  }
  
  .drawer-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .drawer-menu {
    width: 95%;
  }
  
  .drawer-user-section {
    padding: 16px;
  }
  
  .drawer-section {
    padding: 16px;
  }
}

/* Animation for drawer opening */
@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer-menu.open {
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
