/* ========================================
   PROFILE DRAWER - SLIDE-OUT PANEL
   ======================================== */

/* 1. DRAWER OVERLAY */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 2. DRAWER CONTAINER - BOTTOM SLIDE-UP */
.profile-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: 90%;
  max-width: 1200px;
  max-height: 85vh;
  background: linear-gradient(135deg, 
    rgba(20, 20, 30, 0.98) 0%, 
    rgba(30, 30, 45, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-drawer.active {
  transform: translateX(-50%) translateY(0);
}

/* 3. DRAWER HEADER */
.drawer-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 107, 53, 0.05);
}

.drawer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, 
    var(--neon-blue, #667eea) 0%, 
    var(--neon-orange, #ff6b35) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  color: var(--text-primary, #ffffff);
}

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

/* 4. DRAWER CONTENT - HORIZONTAL LAYOUT */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Custom scrollbar for drawer */
.drawer-content::-webkit-scrollbar {
  width: 8px;
}

.drawer-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 53, 0.3);
  border-radius: 4px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 53, 0.5);
}

/* 5. DRAWER SECTIONS - FULL HEIGHT */
.drawer-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  animation: slideInUp 0.5s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.drawer-section h2 {
  font-size: 1.2rem;
  margin: 0 0 20px 0;
  color: var(--text-primary, #ffffff);
}

/* 6. HIDE SIDEBAR ON DESKTOP WHEN DRAWER IS USED */
@media (min-width: 1024px) {
  .sidebar {
    display: none !important;
  }
  
  /* Main content takes full width */
  .container {
    grid-template-columns: 1fr !important;
    max-width: 1200px !important;
  }
}

/* 7. MOBILE - SINGLE COLUMN */
@media (max-width: 767px) {
  .profile-drawer {
    width: 100vw;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
  }
  
  .drawer-header {
    padding: 20px 24px;
  }
  
  .drawer-title {
    font-size: 1.3rem;
  }
  
  .drawer-content {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 24px;
  }
  
  .drawer-section {
    padding: 20px;
    height: auto;
  }
}

/* 8. ANIMATION - SLIDE UP */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 9. DRAWER FOOTER (for sticky buttons) */
.drawer-footer {
  padding: 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.drawer-footer .btn {
  width: 100%;
  margin: 0;
}

/* 10. SUCCESS MESSAGE IN DRAWER */
.drawer-section .success-message {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  color: #4caf50;
  font-size: 0.95rem;
  animation: slideInRight 0.4s ease;
}
