/**
 * FabQuote Header Account Widget Styles
 * Scoped to .fq-header-account to avoid theme or Elementor header conflicts.
 */

.fq-header-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-family: "Poppins", Sans-serif;
  box-sizing: border-box;
}

.fq-header-account *,
.fq-header-account *::before,
.fq-header-account *::after {
  box-sizing: border-box;
}

/* State visibility overrides */
.fq-header-account.is-logged-in .fq-ha-login-btn,
.fq-header-account .fq-ha-login-btn[hidden] {
  display: none !important;
}

.fq-header-account:not(.is-logged-in) .fq-ha-user-menu,
.fq-header-account .fq-ha-user-menu[hidden] {
  display: none !important;
}

/* Login Button */
.fq-header-account .fq-ha-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #CE2367 !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 20px !important;
  text-decoration: none !important;
  border-radius: 10px;
  border: 1.5px solid #CE2367;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.fq-header-account .fq-ha-login-btn:hover,
.fq-header-account .fq-ha-login-btn:focus-visible {
  background-color: #2DA455 !important;
  border-color: #2DA455 !important;
  color: #FFFFFF;
  text-decoration: none;
  outline: none;
  font-size: 14px !important;
  line-height: 20px !important;
  text-decoration: none !important;
}

/* Logged-in User Menu Trigger */
.fq-header-account .fq-ha-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.fq-header-account .fq-ha-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background-color: #FFFFFF;
  color: #201D4E;
  border: 1.5px solid #E5E7EB;
  border-radius: 50px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  max-width: min(190px, 100%);
  min-width: 0;
}

.fq-header-account .fq-ha-trigger:hover,
.fq-header-account .fq-ha-trigger:focus-visible,
.fq-header-account .fq-ha-user-menu.is-open .fq-ha-trigger {
  border-color: #201D4E;
  background-color: #F9FAFB;
  box-shadow: 0 2px 8px rgba(32, 29, 78, 0.1);
  outline: none;
}

.fq-header-account .fq-ha-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #FDD752;
  color: #201D4E;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.fq-header-account .fq-ha-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fq-header-account .fq-ha-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.fq-header-account .fq-ha-user-menu.is-open .fq-ha-chevron {
  transform: rotate(180deg);
}

/* Dropdown Panel */
.fq-header-account .fq-ha-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(32, 29, 78, 0.14);
  padding: 6px;
  display: none;
  z-index: 9999;
}

.fq-header-account.fq-ha-align-left .fq-ha-dropdown {
  right: auto;
  left: 0;
}

.fq-header-account .fq-ha-user-menu.is-open .fq-ha-dropdown {
  display: block;
}

.fq-header-account .fq-ha-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 4px;
}

.fq-header-account .fq-ha-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: #201D4E;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fq-header-account .fq-ha-dropdown-email {
  font-size: 12px;
  color: #2DA455;
  line-height: 20px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.fq-header-account .fq-ha-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #111111;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 20px !important;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fq-header-account .fq-ha-menu-item:hover,
.fq-header-account .fq-ha-menu-item:focus-visible {
  background-color: #F3F4F6;
  color: #201D4E;
  text-decoration: none;
  outline: none;
}

.fq-header-account .fq-ha-divider {
  height: 1px;
  background-color: #F3F4F6;
  margin: 4px 6px;
}

.fq-header-account .fq-ha-logout-btn {
  color: #CE2367;
  font-weight: 600;
}

.fq-header-account .fq-ha-logout-btn:hover,
.fq-header-account .fq-ha-logout-btn:focus-visible {
  background-color: #FDF2F6;
  color: #CE2367;
}

.fq-header-account .fq-ha-icon {
  flex-shrink: 0;
}
