/**
 * ==============================================================================
 * UMOJI STUDIO — PROMO TOPBAR STYLESHEET (topbar-promo.css)
 * ==============================================================================
 * Special Offer 25% Off Announcement Bar with Realtime Countdown Timer
 * Architecture:
 * - Fixed top banner, high-contrast dark background (#000000)
 * - Typography badge matching screenshot: SPECIAL ⚡ OFFER 25% OFF
 * - Centered promo marketing copy with responsive hiding on smaller viewports
 * - Right section: monospace countdown timer + yellow CTA button + dismiss close button
 * - Automatic smooth dismiss state integration with HTML/Body .promo-dismissed
 */

.promo-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-height, 46px);
  background-color: #000000;
  color: #ffffff;
  z-index: 1002;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
}

/* Dismissed State: Hide bar instantly or smoothly */
html.promo-dismissed .promo-topbar,
body.promo-dismissed .promo-topbar {
  display: none !important;
  pointer-events: none;
}

/* Inner Container: Perfectly aligned with Navbar grid */
.promo-topbar__container {
  max-width: var(--container-max, 1280px);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
 * Left: Special Offer 25% Off Badge (Matching Visual Reference)
 * -------------------------------------------------------------------------- */
.promo-topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.promo-topbar__badge-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  line-height: 1.15;
}

.promo-topbar__badge-special {
  letter-spacing: 0.06em;
}

.promo-topbar__badge-offer {
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.06em;
}

.promo-topbar__lightning {
  color: #facc15;
  fill: #facc15;
  flex-shrink: 0;
}

.promo-topbar__badge-value {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.promo-topbar__discount-num {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #facc15;
  letter-spacing: -0.04em;
  line-height: 1;
}

.promo-topbar__discount-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-left: 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.promo-topbar__discount-percent {
  font-size: 13px;
  color: #facc15;
  line-height: 1;
}

.promo-topbar__discount-off {
  font-size: 8.5px;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
 * Center: Promotion Copy Text
 * -------------------------------------------------------------------------- */
.promo-topbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.promo-topbar__text {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
 * Right: Realtime Countdown + Yellow CTA Button + Dismiss Close
 * -------------------------------------------------------------------------- */
.promo-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.promo-topbar__countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', monospace, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.promo-countdown__segment {
  color: #ffffff;
}

.promo-countdown__sep {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin: 0 1px;
}

.promo-topbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #facc15;
  color: #000000 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 7px;
  text-decoration: none !important;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.15s ease;
  box-shadow: none !important;
}

.promo-topbar__btn:hover {
  background-color: #fde047;
  color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

.promo-topbar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 5px;
  line-height: 1;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.promo-topbar__close:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

/* --------------------------------------------------------------------------
 * Responsive Breakpoints (Laptop, Tablet, Mobile)
 * -------------------------------------------------------------------------- */
@media (max-width: 1140px) {
  .promo-topbar__text {
    font-size: 12.5px;
  }
}

@media (max-width: 991px) {
  .promo-topbar__container {
    padding: 0 20px;
  }

  .promo-topbar__center {
    display: none;
  }
}

@media (max-width: 768px) {
  .promo-topbar__container {
    padding: 0 16px;
    gap: 8px;
  }

  .promo-topbar__badge {
    gap: 6px;
  }

  .promo-topbar__badge-label {
    font-size: 9px;
  }

  .promo-topbar__discount-num {
    font-size: 21px;
  }

  .promo-topbar__discount-percent {
    font-size: 10.5px;
  }

  .promo-topbar__discount-off {
    font-size: 7.5px;
  }

  .promo-topbar__right {
    gap: 8px;
  }

  .promo-topbar__countdown {
    font-size: 12px;
    gap: 3px;
  }

  .promo-topbar__btn {
    font-size: 11.5px;
    padding: 5px 10px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .promo-topbar__badge-label {
    display: none;
  }

  .promo-topbar__countdown {
    font-size: 11px;
    gap: 2px;
  }

  .promo-topbar__btn {
    font-size: 11px;
    padding: 4px 8px;
  }
}
