/* Top-center scrolling announcement pill — Indigo-Blue Tech Glass Style */

@media (min-width: 900px) {
  body.public-workbench.product-redesign.compact-tools .topbar > .product-heading:has(#customerAnnounce:not([hidden])) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
  }

  body.public-workbench.product-redesign.compact-tools .topbar > .product-heading > .product-heading-title {
    justify-self: start;
    min-width: 0;
  }

  body.public-workbench.product-redesign.compact-tools .topbar > .product-heading > #toolHeadingExtra {
    justify-self: end;
  }
}

/* Translucent Indigo-tinted Glass Capsule Pill */
.customer-announce {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  max-width: min(650px, 100%);
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(
    90deg,
    rgba(238, 242, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.96) 45%,
    rgba(240, 249, 255, 0.92) 100%
  );
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.08);
  justify-self: center;
  min-width: 0;
}

.customer-announce-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.customer-announce-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.92;
}

.customer-announce-viewport {
  height: 32px;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.customer-announce-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.customer-announce-track.is-slide-1 {
  transform: translateY(-32px);
}

.customer-announce-slide {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 2px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.35;
}

.customer-announce-text {
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.customer-announce-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: #4338ca;
  user-select: all;
}

.customer-announce-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #4f46e5 !important;
  font-size: 13.5px !important;
  font-weight: 650 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}

.customer-announce-cta:hover {
  color: #4338ca !important;
}

.customer-announce-copy.is-copied {
  color: #059669 !important;
  text-decoration: none;
}

.customer-announce-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  margin-left: 2px;
}

.customer-announce-dot-btn {
  width: 6px !important;
  min-width: 6px !important;
  height: 6px !important;
  min-height: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #c7d2fe !important;
  cursor: pointer;
  transition: width 0.22s ease, background-color 0.22s ease;
}

.customer-announce-dot-btn.is-active {
  width: 18px !important;
  min-width: 18px !important;
  background: #4f46e5 !important;
}

/* Mobile (< 900px) full-width slim bar below navigation tabs */
.customer-announce.is-mobile-bar {
  display: flex;
  width: 100%;
  max-width: none;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 1px solid #c7d2fe;
  padding: 0 16px;
  height: 40px;
  box-shadow: none;
}

/* Keep label + contextual "前往购买" aligned cleanly in Coupons & Verification */
body.public-workbench.product-redesign.compact-tools #couponForm .coupon-cdk-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body.public-workbench.product-redesign.compact-tools #couponForm .coupon-cdk-label-row label {
  margin: 0;
}

body.public-workbench.product-redesign.compact-tools #detectionAccess {
  display: block;
}

body.public-workbench.product-redesign.compact-tools #detectionAccess .verification-cdk-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body.public-workbench.product-redesign.compact-tools #detectionAccess .verification-cdk-label-row label {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .customer-announce-track {
    transition: none;
  }
}
