/**
 * Header cart dropdown — loaded after newstyle + ajeb-legacy-ui on all public pages.
 * News/Event/Article pages include ajeb-legacy-ui.css; cart rules must win in cascade.
 */
.header,
.header .header-main,
.header .header-actions,
.header .article-purchase-cart-wrap {
  overflow: visible;
}

.header .article-purchase-cart-wrap {
  position: relative;
  z-index: 75;
}

.header .article-purchase-cart-wrap .icon-btn {
  text-decoration: none;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-800, #133a6f);
  background: var(--sky-50, #eef4fa);
  transition: all 0.2s;
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
}

.header .article-purchase-cart-wrap .icon-btn:hover {
  background: var(--navy-800, #133a6f);
  color: var(--white, #fff);
  transform: translateY(-1px);
}

.header .article-purchase-cart-wrap .icon-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--red-600, #c8102e);
  color: var(--white, #fff);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white, #fff);
  line-height: 1;
  padding: 0;
}

.header .article-purchase-cart-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white, #fff);
  min-width: 280px;
  max-width: 360px;
  box-shadow: var(--shadow-lg, 0 18px 40px rgba(15, 42, 82, 0.14));
  border-radius: var(--radius, 8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 80;
  border-top: 3px solid var(--gold-500, #c9a227);
  padding: 12px 14px;
  box-sizing: border-box;
}

.header .article-purchase-cart-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header .article-purchase-cart-title {
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--navy-800, #133a6f);
}

.header .article-purchase-cart-list {
  list-style: none !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  max-height: 220px;
  overflow-y: auto;
}

.header .article-purchase-cart-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line, #e3e9f0);
  font-size: 12px;
  list-style: none !important;
}

.header .article-purchase-cart-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header .article-purchase-cart-item-title {
  word-break: break-word;
  font-weight: 600;
  color: var(--navy-800, #133a6f);
}

.header .article-purchase-cart-item-authors {
  word-break: break-word;
  font-size: 11px;
  color: var(--ink-500, #5c6a7d);
  line-height: 1.35;
}

.header .article-purchase-cart-remove {
  border: none;
  background: transparent;
  color: #c44;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  flex-shrink: 0;
}

.header .article-purchase-cart-empty {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-500, #5c6a7d);
}

.header .article-purchase-checkout-link {
  display: block;
  text-align: center;
  padding: 8px 12px;
  background: var(--navy-800, #133a6f);
  color: var(--white, #fff) !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.header .article-purchase-checkout-link:hover {
  background: var(--navy-700, #1b4a8a);
  color: var(--white, #fff) !important;
}

.article-purchase-cart-summary {
  margin-bottom: 1rem;
}

.article-purchase-checkout-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
