/*
  Shared UI primitives for the static AppJuice site.
  Keep this build-free: pages can include it after their local CSS to normalize
  buttons, menus, and account controls without a framework migration.
*/

.btn {
  align-items: center;
  border-radius: var(--radius, 8px);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.1;
  min-height: 40px;
  padding: 8px 14px;
  white-space: nowrap;
}

.btn-primary {
  box-shadow: 0 8px 18px rgba(255, 79, 0, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(255, 79, 0, 0.22);
}

.nav .btn,
.account-trigger {
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 38px;
  min-width: 0;
  padding: 8px 12px;
}

.account-menu {
  display: inline-flex;
  position: relative;
}

.account-trigger {
  max-width: 176px;
}

.account-trigger::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: '';
  flex: 0 0 auto;
  height: 6px;
  margin-left: 2px;
  transform: rotate(45deg) translateY(-2px);
  width: 6px;
}

.account-dropdown {
  background: #fff;
  border: 1px solid var(--border, rgba(31, 29, 26, 0.12));
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(31, 29, 26, 0.14);
  display: none;
  gap: 2px;
  min-width: 156px;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: max-content;
  z-index: 120;
}

.account-dropdown.open {
  display: grid;
}

.account-dropdown a,
.account-dropdown button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--fg, #1f1d1a);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  justify-content: flex-start;
  line-height: 1.2;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: rgba(31, 29, 26, 0.06);
  color: var(--fg, #1f1d1a);
}

@media (max-width: 540px) {
  .nav .btn,
  .account-trigger {
    max-width: 144px;
  }

  .account-dropdown {
    left: auto;
    right: 0;
  }
}
