.header-email-dropdown {
  position: relative;
  display: inline-block;
}

.email-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}



.email-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.email-menu a:hover {
  background: #f3f0f8;
  color: #6554a0;
}

.header-email-dropdown.open .email-menu {
  display: block;
}

/* Dropdown container */
.header-email-dropdown {
  position: relative;
  display: inline-block;
}

/* Email icon and text hover effect */
.email-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: color 0.3s ease;
}

.email-toggle:hover {
  color: #ffdf00;
}

.email-toggle i {
  transition: transform 0.3s ease;
}

/* Dropdown menu */
.email-menu {
  display: block;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 250px;
  padding: 6px 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Open dropdown on hover */
.header-email-dropdown:hover .email-menu,
.header-email-dropdown:focus-within .email-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Individual email links */
.email-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.25s ease;
}

/* Email link hover */
.email-menu a:hover {
  background: #f2effa;
  color: #6554a0;
  padding-left: 21px;
}

.email-menu a i {
  color: #6554a0;
  transition: transform 0.25s ease;
}

.email-menu a:hover i {
  transform: scale(1.15);
}

.header-email-dropdown .email-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 267px;
    min-width: 250px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 0;
    isolation: isolate;
}
/* Email links */
.header-email-dropdown .email-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;

    color: #333 !important;
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
}

/* Keep email dropdown above nearby header elements */
.header-email-dropdown,
.header-email-dropdown .email-menu {
    overflow: visible;
}

/* Contact wrapper */
.header-contact-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: visible;
}

/* Phone dropdown */
.header-phone-dropdown {
    position: relative;
    display: inline-block;
    z-index: 10010;
}

.phone-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    transition: color 0.3s ease;
}

.phone-toggle:hover,
.phone-toggle:focus-visible {
    color: #ffdf00;
}

/* Phone menu */
.phone-menu {
    position: absolute;
    top: calc(100% + 3px);
    right: -44px;
    z-index: 10011;
    width: 175px;
    box-sizing: border-box;
    padding: 6px 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);

    transition: opacity 0.25s ease,
                transform 0.25s ease,
                visibility 0.25s ease;
}

/* Open phone menu */
.header-phone-dropdown:hover .phone-menu,
.header-phone-dropdown:focus-within .phone-menu,
.header-phone-dropdown.open .phone-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Phone links */
.phone-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;

    color: #000 !important;
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.phone-menu a i {
    color: #6554a0;
}

.phone-menu a:hover,
.phone-menu a:focus-visible {
    color: #6554a0;
    background: #f2effa;
}
