/* =========================================================
   DD Events Frontend User Avatar + Mobile Account Card
   Desktop: circular avatar dropdown.
   Mobile: direct account card inside the off-canvas menu.
   ========================================================= */

.header-user-dropdown {
  position: relative;
}

.header-user-mobile-card {
  display: none;
}

.header-user-avatar-toggle {
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 3px;
  border: 1px solid rgba(200, 164, 107, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, #fff7f0 100%);
  box-shadow: 0 10px 26px rgba(19, 13, 9, 0.10);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.header-user-avatar-toggle:hover,
.header-user-avatar-toggle:focus,
.header-user-avatar-toggle.show {
  transform: translateY(-1px);
  border-color: rgba(200, 164, 107, 0.9);
  box-shadow: 0 14px 32px rgba(19, 13, 9, 0.16);
  outline: none;
}

.header-user-avatar-toggle.dropdown-toggle::after {
  display: none;
}

.header-user-avatar {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #fff2f4;
}

.header-user-menu {
  min-width: 220px;
  padding: 10px;
  border: 1px solid rgba(200, 164, 107, 0.25);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(19, 13, 9, 0.14);
  overflow: hidden;
}

.header-user-menu .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

.header-user-menu .dropdown-divider {
  margin: 8px 0;
}

.header-user-menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(20, 13, 9, 0.08);
}

.header-user-menu-head span {
  color: #8b8178;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-user-menu-head strong {
  max-width: 180px;
  overflow: hidden;
  color: #19130f;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile account UI: do not use Bootstrap dropdown inside the slide menu. */
@media (max-width: 767px) {
  #navmenulist .header-user-desktop {
    display: none !important;
  }

  #navmenulist .header-user-mobile-card {
    display: block !important;
    order: -1;
    width: 100% !important;
    padding: 12px !important;
    border-bottom: 1px solid #f2ebe6 !important;
    background: linear-gradient(135deg, #fff8f3 0%, #ffffff 100%) !important;
  }

  #navmenulist .mobile-account-card {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(200, 164, 107, 0.25);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(28, 15, 8, 0.08);
  }

  #navmenulist .mobile-account-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f4eeee;
  }

  #navmenulist .mobile-account-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: #fff2f4;
    box-shadow: 0 8px 18px rgba(19, 13, 9, 0.13);
  }

  #navmenulist .mobile-account-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  #navmenulist .mobile-account-info span {
    color: #8b8178;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  #navmenulist .mobile-account-info strong {
    max-width: 165px;
    overflow: hidden;
    color: #1d1510;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #navmenulist .mobile-account-links {
    display: grid;
    gap: 8px;
    padding-top: 12px;
  }

  #navmenulist .mobile-account-links a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: auto !important;
    padding: 11px 12px !important;
    border: 1px solid #f1e7de;
    border-radius: 13px;
    background: #fffaf6 !important;
    color: #231a14 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
  }

  #navmenulist .mobile-account-links a:hover,
  #navmenulist .mobile-account-links a:focus,
  #navmenulist .mobile-account-links a:active {
    border-color: rgba(254, 63, 64, 0.28);
    background: rgba(254, 63, 64, 0.07) !important;
    color: var(--main-color, #fe3f40) !important;
  }

  #navmenulist .mobile-account-links i {
    width: 18px;
    color: inherit;
    font-size: 15px;
    text-align: center;
  }

  #navmenulist .mobile-account-links .mobile-account-logout {
    background: #fff5f5 !important;
    color: #d9233f !important;
  }

  /* The base mobile menu pins the last nav item for Get Quote.
     Logged-in users have the hidden desktop account item at the end, so disable
     that footer behavior for the desktop account placeholder on mobile. */
  #navmenulist > li.header-user-desktop:last-child {
    display: none !important;
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }
}

@media (min-width: 768px) {
  .header-user-desktop {
    display: list-item;
  }

  .header-user-mobile-card {
    display: none !important;
  }
}
