.ygs-account-widget {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 40;
}

.ygs-account-widget.is-floating {
  position: fixed;
  top: 16px;
  right: 16px;
}

.ygs-account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ygs-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.ygs-label {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.ygs-caret {
  font-size: 12px;
  opacity: 0.7;
}

.ygs-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 270px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  padding: 14px;
  display: none;
}

.ygs-account-widget.is-open .ygs-account-menu {
  display: block;
}

.ygs-account-menu-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ygs-account-menu-head strong {
  font-size: 15px;
}

.ygs-account-menu-head span {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.64);
}

.ygs-account-links,
.ygs-account-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.ygs-account-links a,
.ygs-account-actions button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  text-align: left;
  text-decoration: none;
  font: inherit;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.ygs-account-links a:hover,
.ygs-account-actions button:hover,
.ygs-account-button:hover {
  background: rgba(15, 23, 42, 0.05);
}

.ygs-account-widget[data-host="yachttop.ru"] .ygs-account-button,
.ygs-account-widget[data-host="www.yachttop.ru"] .ygs-account-button {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.ygs-account-widget[data-host="yachttop.ru"] .ygs-avatar,
.ygs-account-widget[data-host="www.yachttop.ru"] .ygs-avatar {
  background: #f6c96b;
  color: #0f172a;
}

.ygs-account-widget[data-host="yachttop.ru"] .ygs-account-button:hover,
.ygs-account-widget[data-host="www.yachttop.ru"] .ygs-account-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ygs-account-widget[data-placement="yachtgs-header"],
.ygs-account-widget[data-placement="lifeyacht-header"] {
  margin-left: 16px;
}

.ygs-account-widget[data-placement="yachttop-desktop"],
.ygs-account-widget[data-placement="capitangs-desktop"] {
  margin-left: 0;
}

.ygs-account-widget[data-placement$="mobile-closed"] {
  margin-right: 8px;
}

.ygs-account-widget[data-placement$="mobile-closed"] .ygs-account-button {
  min-width: 42px;
  padding: 8px;
}

.ygs-account-widget[data-placement$="mobile-closed"] .ygs-label,
.ygs-account-widget[data-placement$="mobile-closed"] .ygs-caret {
  display: none;
}

.ygs-account-widget[data-placement$="mobile-menu"] {
  width: 100%;
  margin: 12px 0 0;
}

.ygs-account-widget[data-placement$="mobile-menu"] .ygs-account-button {
  width: 100%;
  justify-content: flex-start;
  border-radius: 16px;
}

.ygs-account-widget[data-placement$="mobile-menu"] .ygs-account-menu {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  min-width: 0;
  width: 100%;
  margin-top: 10px;
  box-shadow: none;
}

@media (max-width: 640px) {
  .ygs-account-button {
    padding: 8px 12px;
  }

  .ygs-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ygs-account-menu {
    right: 0;
    left: auto;
    min-width: min(280px, calc(100vw - 24px));
  }
}
