/*
 * Site header (partials/site-header.blade.php): floating purple bar, Products
 * mega dropdown, Pricing Plan + Login / account menu, mobile menu.
 * Scoped under .ae-hdr; theme styles for header/nav/a are reset here.
 */

.ae-hdr {
  --hdr-purple: #6526DE;
  --hdr-purple-dark: #5A1FD0;
  --hdr-ink: #111;
  --hdr-panel: #F0F0FD;
  --hdr-font: 'Google Sans', 'Product Sans', 'Poppins', system-ui, sans-serif;

  position: relative;
  z-index: 1000;
  padding: 12px 24px 24px;
  font-family: var(--hdr-font);
  line-height: 1.3;
}
.ae-hdr *,
.ae-hdr *::before,
.ae-hdr *::after { box-sizing: border-box; }
.ae-hdr [hidden] { display: none !important; }
.ae-hdr a { text-decoration: none; }
.ae-hdr button { font-family: inherit; }
.ae-hdr ul { margin: 0; padding: 0; list-style: none; }
.ae-hdr li { margin: 0; }
.ae-hdr svg { display: block; flex: none; }

/* ------------------------------------------------------------ bar */
.ae-hdr__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  min-height: 60px;
  margin: 0 auto;
  padding: 10px 12px 10px 22px;
  border-radius: 30px;
  background: var(--hdr-purple);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.ae-hdr__logo { display: flex; flex: none; align-items: center; }
.ae-hdr__logo img { display: block; width: auto; height: 31px; max-width: 264px; }

.ae-hdr__nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 0;
}
.ae-hdr .ae-hdr__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 16px;
  font-weight: 430;
  letter-spacing: -.2px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  opacity: .92;
  transition: opacity .15s ease;
}
.ae-hdr .ae-hdr__link:hover,
.ae-hdr .ae-hdr__link:focus-visible,
.ae-hdr .ae-hdr__link[aria-expanded="true"],
.ae-hdr .ae-hdr__link.is-current { color: #fff; background: none; opacity: 1; }
.ae-hdr .ae-hdr__link.is-current { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.ae-hdr .ae-hdr__link--products { opacity: 1; }
.ae-hdr__grid { display: flex; }

.ae-hdr__actions { display: flex; flex: none; align-items: center; gap: 12px; }
.ae-hdr .ae-hdr__pricing {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  height: 36px;
  padding: 0 19px 0 20px;
  border-radius: 18px;
  background: linear-gradient(90deg, #FBC901 0%, #FBC901 77%, #D09700 100%);
  color: #000;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}
/* The two light diagonal stripes behind "Plan". */
.ae-hdr .ae-hdr__pricing::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 83px;
  width: 20px;
  background: linear-gradient(90deg, #FCD434 0 12px, transparent 12px 16px, #FCD434 16px 20px);
  transform: skewX(51deg);
  pointer-events: none;
}
.ae-hdr .ae-hdr__pricing > * { position: relative; }
.ae-hdr__crown { fill: #000; margin-top: -1px; }
.ae-hdr .ae-hdr__pricing:hover,
.ae-hdr .ae-hdr__pricing:focus-visible { color: var(--hdr-ink); filter: brightness(1.05); transform: translateY(-1px); }
.ae-hdr .ae-hdr__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border-radius: 18px;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ae-hdr .ae-hdr__login:hover,
.ae-hdr .ae-hdr__login:focus-visible { color: var(--hdr-ink); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }

/* ------------------------------------------------------------ account menu */
.ae-hdr__account { position: relative; }
.ae-hdr .ae-hdr__avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 4px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--hdr-ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.ae-hdr .ae-hdr__avatar-btn:hover,
.ae-hdr .ae-hdr__avatar-btn:focus-visible { background: #fff; color: var(--hdr-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.ae-hdr__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8B4FF0, #6A2ED6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  object-fit: cover;
}
.ae-hdr__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 8px;
  border: 1.5px solid #E4E2FA;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(40, 10, 80, .18);
}
.ae-hdr__menu-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #F1EDF8;
}
.ae-hdr__menu-who strong { color: var(--hdr-ink); font-size: 14px; font-weight: 600; }
.ae-hdr__menu-who span { overflow: hidden; color: #6E6880; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ae-hdr .ae-hdr__menu a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--hdr-ink);
  font-size: 14px;
  font-weight: 500;
}
.ae-hdr .ae-hdr__menu a:hover,
.ae-hdr .ae-hdr__menu a:focus-visible { background: #F5F1FE; color: var(--hdr-purple); }
.ae-hdr .ae-hdr__menu a.log-logout-button { color: #DC2029; }

/* ------------------------------------------------------------ products panel */
.ae-hdr__products { position: static; }
.ae-hdr__panel {
  --notch-x: 50%;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(923px, calc(100vw - 32px));
  padding: 30px 33px 33px;
  border: 3.5px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(var(--hdr-panel), var(--hdr-panel)) padding-box,
    linear-gradient(180deg, #948DE5 0%, #C7C3F3 55%, #E5E5FF 100%) border-box;
  transform: translateX(-50%);
  animation: ae-hdr-drop .18s ease-out;
}
/* The bump in the panel's top border under the Products link: part of the
   border itself (smooth shoulders, no line across its base), rising 10px so
   it meets the bar. */
.ae-hdr__bump {
  position: absolute;
  top: -13.75px;
  left: var(--notch-x);
  display: block;
  width: 140px;
  height: 16px;
  transform: translateX(-50%);
  pointer-events: none;
}
.ae-hdr__panel::after {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.ae-hdr .ae-hdr__cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 35px;
}
.ae-hdr .ae-hdr__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  height: 80px;
  padding: 0 0 0 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 5px rgba(0, 0, 0, .25);
  color: var(--hdr-ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ae-hdr .ae-hdr__card:hover,
.ae-hdr .ae-hdr__card:focus-visible { color: var(--hdr-ink); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(40, 10, 80, .22); }
.ae-hdr .ae-hdr__card.is-current { box-shadow: 0 0 0 2px var(--hdr-purple), 0 3px 6px rgba(0, 0, 0, .25); }
.ae-hdr__card-title { min-width: 0; font-size: 17px; font-weight: 400; line-height: 1.15; }
/* Every artwork is 81x90; shown at the same box on every card. */
.ae-hdr__art { flex: none; width: 63px; height: 70px; object-fit: contain; object-position: right center; }

@keyframes ae-hdr-drop {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ------------------------------------------------------------ burger + mobile */
.ae-hdr .ae-hdr__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
}
.ae-hdr .ae-hdr__burger:hover { background: rgba(255, 255, 255, .26); }
.ae-hdr__burger span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ae-hdr__mobile {
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 10px auto 0;
  padding: 10px 16px 16px;
  border: 2px solid #E4E2FA;
  border-radius: 22px;
  background: var(--hdr-panel);
  box-shadow: 0 12px 30px rgba(40, 10, 80, .15);
}
.ae-hdr .ae-hdr__m-toggle,
.ae-hdr .ae-hdr__m-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid #E1DEF5;
  background: none;
  color: var(--hdr-ink);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.ae-hdr .ae-hdr__m-toggle:hover,
.ae-hdr .ae-hdr__m-item:hover { background: none; color: var(--hdr-purple); }
.ae-hdr__m-toggle svg { transition: transform .2s ease; }
.ae-hdr__m-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ae-hdr__m-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 0 14px; border-bottom: 1px solid #E1DEF5; }
.ae-hdr .ae-hdr__m-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--hdr-ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
}
.ae-hdr .ae-hdr__m-tool:hover { color: var(--hdr-purple); }
.ae-hdr .ae-hdr__m-tool img { flex: none; width: 27px; height: 30px; object-fit: contain; }
.ae-hdr__m-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.ae-hdr__m-actions .ae-hdr__login { background: #fff; box-shadow: inset 0 0 0 1.5px #DDD6EA; }

@media (max-width: 1180px) {
  .ae-hdr__nav { gap: 22px; }
  .ae-hdr .ae-hdr__link,
  .ae-hdr .ae-hdr__pricing,
  .ae-hdr .ae-hdr__login { font-size: 15px; }
  .ae-hdr__logo img { height: 27px; }
}
@media (max-width: 1024px) {
  .ae-hdr__nav,
  .ae-hdr__bar > .ae-hdr__actions { display: none; }
  .ae-hdr .ae-hdr__burger { display: flex; }
}
@media (min-width: 1025px) {
  .ae-hdr__mobile { display: none !important; }
}
@media (max-width: 600px) {
  .ae-hdr { padding: 12px 12px 16px; }
  .ae-hdr__bar { min-height: 54px; padding: 8px 8px 8px 16px; border-radius: 27px; }
  .ae-hdr__logo img { height: 24px; max-width: 204px; }
}
@media (prefers-reduced-motion: reduce) {
  .ae-hdr__panel { animation: none; }
}
