﻿/* =============================================
   PROFILE DRAWER — Sky My Trip
   ============================================= */

/* BACKDROP */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(2px);
  z-index: 1090;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── DRAWER PANEL ── */
.profile-dropdown {
  position: fixed;
  top: 75px;
  right: 0;
  bottom: 0;
  width: min(320px, 100vw);
  max-height: calc(100vh - 75px);
  background: #ffffff;
  border-radius: 0;
  box-shadow: -6px 0 40px rgba(15, 23, 42, 0.14);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  border: none;

  /* Slide in from right */
  animation: slideInRight 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Scrollbar only appears when content overflows */
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── HEADER ── */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 15px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  background: #fff;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 11px;
}

.drawer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 2px solid #e0e7ff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
  display: block;
}

.drawer-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1;
}

.drawer-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin: 0;
}

/* CLOSE BUTTON */
.close-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: scale(1.08);
}

/* ── CONTENT ── */
.drawer-content {
  flex: 1;
  padding: 8px 14px 0;

  /* Scroll only when content overflows viewport */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}

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

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

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

/* ── SECTION ── */
.drawer-section {
  margin-bottom: 6px;
  padding-top: 12px;
}

/* Section label */
.title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 6px 4px;
}

/* ── ITEM ── */
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.17s ease;
  position: relative;
}

.item:hover {
  background: #f0f4ff;
}

.item:hover .item-label {
  color: #1a2558;
}

.item:hover .item-icon-box {
  background: #dbeafe;
  color: #1a2558;
}

.item:hover .item-chevron {
  opacity: 1;
  transform: translateX(2px);
}

/* Icon box */
.item-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.17s ease, color 0.17s ease;
}

/* Item label */
.item-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  transition: color 0.17s ease;
}

/* NEW badge */
.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 20px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1c2860;
}

/* Chevron arrow */
.item-chevron {
  font-size: 10px;
  color: #cbd5e1;
  opacity: 0;
  transition: opacity 0.17s ease, transform 0.17s ease;
}

/* ── DIVIDER ── */
hr {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 10px 0 8px;
}

/* ── LOGOUT ── */
.logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
  background: #fff5f5;
  border: 1.5px solid #fecaca;
  transition: background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.logout svg {
  font-size: 14px;
  transition: transform 0.18s ease;
}

.logout:hover {
  background: #fef2f2;
  border-color: #f87171;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
  transform: translateX(2px);
}

.logout:hover svg {
  transform: translateX(3px);
}