/* Header, promo bar, ticker, pills, drawers. Semantic tokens only. */

.promptix-icon { flex: none; vertical-align: middle; }

.promptix-iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-body);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.promptix-iconbtn:hover { color: var(--color-primary); background: var(--bg-hover); }

.promptix-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.promptix-cart-count.is-empty { display: none; }

/* Promo bar */
.promptix-promo { color: var(--text-inverse); background: var(--gradient-primary); }
.promptix-promo__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 40px;
  font-size: 14px;
}
.promptix-promo__text { margin: 0; color: inherit; font-weight: 600; }
.promptix-promo__code { color: inherit; opacity: .9; }
.promptix-promo__countdown { font-variant-numeric: tabular-nums; font-weight: 700; }
.promptix-promo .promptix-promo__btn {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--color-primary);
  background: var(--white);
  border-color: var(--white);
}

/* Ticker (header 3) */
.promptix-ticker { background: var(--bg-section); border-bottom: 1px solid var(--border-default); font-size: 13px; }
.promptix-ticker__inner { display: flex; align-items: center; gap: 16px; min-height: 36px; }
.promptix-ticker__label { display: inline-flex; align-items: center; gap: 6px; color: var(--color-primary); font-weight: 700; }
.promptix-ticker__list { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.promptix-ticker__list a { color: var(--text-body); font-weight: 500; }
.promptix-ticker__list a:hover { color: var(--color-primary); }
.promptix-ticker__rank { color: var(--color-primary); font-weight: 700; }
.promptix-ticker__theme { margin-left: auto; width: 32px; height: 32px; }

/* Header */
.promptix-header {
  position: relative;
  z-index: 50;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
}
.has-sticky-header .promptix-header { position: sticky; top: 0; }
.admin-bar.has-sticky-header .promptix-header { top: 32px; }

.promptix-header__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-height);
}
.promptix-header__brand { display: inline-flex; align-items: center; flex: none; color: var(--text-heading); font-size: 22px; font-weight: 800; }
.promptix-header__brand:hover { color: var(--text-heading); }

.promptix-header--h1 .promptix-header__nav { flex: 1; display: flex; justify-content: center; }
.promptix-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.promptix-header--h2 .promptix-header__search,
.promptix-header--h3 .promptix-header__search { flex: 1; max-width: 720px; }

.promptix-header__menu-row { border-top: 1px solid var(--border-default); }
.promptix-header--h2 .promptix-header__menu-row { border-top: 0; margin-top: -8px; padding-bottom: 6px; }

.promptix-header__user { display: inline-flex; align-items: center; gap: 8px; color: var(--text-body); font-weight: 500; font-size: 14px; }
.promptix-header__avatar { border-radius: 50%; }
.promptix-header__signin { padding: 8px 12px; }
.promptix-header__cta { white-space: nowrap; }

/* Navigation */
.promptix-nav,
.promptix-mobile-nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.promptix-nav > li { position: relative; }
.promptix-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--text-body);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-md);
}
.promptix-nav a:hover,
.promptix-nav .current-menu-item > a,
.promptix-nav .current-menu-ancestor > a { color: var(--color-primary); }
.promptix-nav > .current-menu-item > a { background: var(--bg-active); }

.promptix-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  display: none;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.promptix-nav li:hover > .sub-menu,
.promptix-nav li:focus-within > .sub-menu { display: block; }
.promptix-nav .sub-menu a { padding: 8px 12px; }
.promptix-nav .sub-menu a:hover { background: var(--bg-hover); }

.promptix-mobile-nav { flex-direction: column; gap: 0; }
.promptix-mobile-nav a { display: block; padding: 12px 4px; color: var(--text-heading); font-weight: 600; border-bottom: 1px solid var(--border-default); }
.promptix-mobile-nav .sub-menu { margin: 0; padding: 0 0 0 16px; list-style: none; }
.promptix-mobile-nav .sub-menu a { font-weight: 500; color: var(--text-body); }

.promptix-burger { display: none; }

/* Search */
.promptix-search { display: flex; align-items: stretch; width: 100%; background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
.promptix-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--ui-focus-glow); }
.promptix-search__scope { width: auto; min-width: 130px; border: 0; border-right: 1px solid var(--border-default); border-radius: 0; background: var(--bg-subtle); font-size: 14px; }
.promptix-search__input { flex: 1; min-width: 0; width: auto; padding: 11px 14px; color: var(--text-body); background: transparent; border: 0; font: inherit; }
.promptix-search__input:focus { outline: none; }
.promptix-search .promptix-search__submit { border-radius: 0; min-height: 42px; }
.promptix-search select:focus,
.promptix-search select:hover { box-shadow: none; }

/* Pills */
.promptix-pills { background: var(--bg-card); border-bottom: 1px solid var(--border-default); }
.promptix-pills__list { display: flex; gap: 8px; margin: 0; padding: 12px 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.promptix-pills__list::-webkit-scrollbar { display: none; }
.promptix-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.promptix-pill:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* Drawers / overlay */
.promptix-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); }
.promptix-overlay[hidden] { display: none; }

.promptix-drawer {
  position: fixed;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.promptix-drawer.is-open { visibility: visible; transform: none; transition: transform .25s ease; }
.promptix-drawer--left,
.promptix-drawer--right { top: 0; bottom: 0; width: min(380px, 90vw); }
.promptix-drawer--left { left: 0; transform: translateX(-100%); }
.promptix-drawer--right { right: 0; transform: translateX(100%); }
.promptix-drawer--top { top: 0; left: 0; right: 0; padding: 20px 0; transform: translateY(-100%); }

.promptix-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-default); }
.promptix-drawer__title { color: var(--text-heading); font-weight: 700; }
.promptix-drawer__body { flex: 1; padding: 16px; overflow-y: auto; }
.promptix-drawer__cta { margin-top: 20px; }
.promptix-drawer__cta .btn { width: 100%; }
.promptix-drawer__search { display: flex; align-items: center; gap: 12px; }

.promptix-mini-cart .woocommerce-mini-cart { margin: 0; padding: 0; list-style: none; }

body.has-drawer-open { overflow: hidden; }

/* Back to top + toasts */
.promptix-totop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-inverse);
  background: var(--color-primary);
  border: 0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.promptix-totop[hidden] { display: none; }

@media (max-width: 991px) {
  .promptix-header__nav,
  .promptix-header--h2 .promptix-header__menu-row,
  .promptix-header--h3 .promptix-header__menu-row,
  .promptix-header__signin-wrap,
  .promptix-header--h2 .promptix-header__search,
  .promptix-header--h3 .promptix-header__search,
  .promptix-ticker__list { display: none; }
  .promptix-burger { display: inline-flex; }
  .promptix-header__row { gap: 12px; }
  .promptix-header__cta { display: none; }
  .promptix-search__label { display: none; }
}

@media (max-width: 782px) {
  .admin-bar.has-sticky-header .promptix-header { top: 46px; }
}

/* Logo (Light / Dark variants) */
.promptix-logo { display: block; max-height: 48px; width: auto; }
.promptix-logo--dark { display: none; }
:root[data-theme="dark"] .promptix-logo--dark { display: block; }
:root[data-theme="dark"] .promptix-logo--light:not(:only-child) { display: none; }
