/* Drawers & Overlay */
.bottom-drawer,
.submenu-drawer {
  position: fixed;
  bottom: -90vh;
  left: 0;
  width: 100%;
  height: 80vh;
  background-color: var(--white);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  transition: bottom var(--transition-speed) ease;
  z-index: 1100;
  overflow-y: auto;
}

.bottom-drawer.active,
.submenu-drawer.active {
  bottom: 0;
}

.submenu-drawer {
    z-index: 1150;
    display: none;
}
.submenu-drawer.active {
    display: block;
}

.drawer-handle {
  width: 40px;
  height: 5px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin: 10px auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.active {
  display: block;
}

/* Settings-specific styles */
.settings-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin: 15px 0;
}

.menu-section {
  margin-bottom: 0; /* Remove margin */
  padding-bottom: 20px; /* Add padding instead */
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

a.menu-item {
  text-decoration: none;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: var(--text-color);
  font-size: 20px;
}

.menu-item-icon i {
  color: var(--primary-color);
}

.menu-item-text {
  font-size: 16px;
  color: var(--text-color);
}

.menu-item-right {
  color: var(--text-secondary);
}

.menu-section .menu-item:last-child {
  border-bottom: none;
}

/* Submenu (Account Drawer) */
.submenu-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.back-button {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 15px;
  font-size: 18px;
}

.back-button i {
  color: var(--primary-color);
}

.submenu-title {
  font-size: 20px;
  font-weight: 600;
}

.submenu-content {
  padding: 20px;
}

/* --- FIX: Profile Section Styles --- */
.profile-section {
  margin-bottom: 1rem;
}

.profile-header {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-email {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}
/* --- End of Profile Section Styles --- */


/* Desktop Overrides */
@media (min-width: 768px) {
  .drawer-handle {
    display: none !important;
  }
  .bottom-drawer,
  .submenu-drawer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 500px !important;
    height: auto !important;
    max-height: 80vh !important;
    border-radius: var(--border-radius) !important;
    bottom: auto !important;
    transition: opacity var(--transition-speed) ease !important;
    opacity: 0;
    display: none;
  }
  .bottom-drawer.active,
  .submenu-drawer.active {
    opacity: 1 !important;
    display: block !important;
    bottom: auto !important;
  }
}
