/**
 * DirectSkills — Cyber Monday Campaign Styles (Display-only, Scoped)
 * Brand Palette: Deep Navy (#0E1B42), Deep Plum (#641554), Bright Magenta (#D90B72 / #A8005E), Crisp White (#FFFFFF).
 */

/* ==========================================================================
   1. TOPBAR PILL & SITEWIDE ANNOUNCEMENT STRIP
   ========================================================================== */
#top-bar .ds-cm-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a8005e 0%, #641554 100%);
  border: 1px solid rgba(255, 168, 214, 0.72);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  line-height: 1.35;
  white-space: nowrap !important;
  flex-shrink: 0;
}

#top-bar .ds-cm-topbar-pill span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

.ds-cm-topbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.ds-cm-announcement-strip {
  position: relative;
  z-index: 90;
  width: 100%;
  min-height: 44px;
  background: linear-gradient(90deg, #0e1b42 0%, #2b1348 34%, #641554 68%, #0e1b42 100%);
  border-bottom: 1px solid rgba(217, 11, 114, 0.48);
  color: #ffffff !important;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
}

#dsCmAnnouncementStrip,
#dsCmAnnouncementStrip span,
#dsCmAnnouncementStrip a,
#dsCmAnnouncementStrip strong,
#dsCmAnnouncementStrip button {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

#dsCmAnnouncementStrip .ds-cm-strip-subcopy,
#dsCmAnnouncementStrip .ds-cm-strip-subcopy span {
  color: rgba(241, 245, 249, 0.88) !important;
  -webkit-text-fill-color: rgba(241, 245, 249, 0.88) !important;
}

.ds-cm-announcement-strip.is-dismissed {
  display: none !important;
}

.ds-cm-strip-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ds-cm-strip-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

#dsCmAnnouncementStrip .ds-cm-strip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d90b72 0%, #a8005e 100%);
  border: 1px solid rgba(255, 192, 224, 0.6);
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.15 !important;
}

#dsCmAnnouncementStrip .ds-cm-strip-badge span {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.ds-cm-strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

#dsCmAnnouncementStrip .ds-cm-strip-text {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dsCmAnnouncementStrip .ds-cm-strip-headline {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dsCmAnnouncementStrip .ds-cm-strip-subcopy {
  display: none !important;
}

.ds-cm-strip-sep {
  color: #ff6cb8 !important;
}

.ds-cm-strip-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#dsCmAnnouncementStrip .ds-cm-strip-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#dsCmAnnouncementStrip .ds-cm-strip-timer strong {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

#dsCmAnnouncementStrip .ds-cm-strip-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d90b72 0%, #a8005e 100%);
  border: 1px solid rgba(255, 192, 224, 0.6);
  color: #ffffff !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}

#dsCmAnnouncementStrip .ds-cm-strip-cta span {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.ds-cm-strip-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#dsCmAnnouncementStrip .ds-cm-strip-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.ds-cm-offers-card .ds-promo-card-badge.ds-cm-card-badge {
  background: linear-gradient(135deg, #a8005e 0%, #641554 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 192, 224, 0.5);
}

.ds-promo-tag-cm {
  background: linear-gradient(135deg, #a8005e 0%, #641554 100%);
  color: #ffffff !important;
}

@media (max-width: 1199px) {
  .ds-cm-strip-subcopy {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .ds-cm-strip-container {
    padding: 8px 12px;
    gap: 7px;
    flex-direction: column;
    align-items: flex-start;
  }
  .ds-cm-strip-content {
    gap: 5px;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .ds-cm-strip-text {
    font-size: 12px !important;
    white-space: normal !important;
    display: block;
    line-height: 1.35;
    width: 100%;
  }
  .ds-cm-strip-headline {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  .ds-cm-strip-badge {
    font-size: 9.5px !important;
    padding: 3px 8px;
  }
  .ds-cm-strip-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .ds-cm-strip-timer {
    font-size: 10.5px !important;
    padding: 3px 8px;
  }
  .ds-cm-strip-cta {
    font-size: 11px !important;
    padding: 4px 10px;
    max-width: 100%;
  }
  .ds-cm-strip-cta span {
    font-size: 11px !important;
  }
}

@media (max-width: 360px) {
  .ds-cm-strip-container {
    padding: 6px 10px;
  }
  .ds-cm-strip-cta svg {
    display: none;
  }
}

/* ==========================================================================
   2. PHYSICAL HANGING TAGS (HOMEPAGE CARD, COURSE CARDS, COURSE HERO)
   ========================================================================== */
.ds-glass-card-main {
  position: relative;
  overflow: visible;
}

.ds-cm-hang-tag {
  position: absolute;
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
  z-index: 8;
}

.ds-cm-hang-pendulum {
  position: relative;
  transform-origin: 50% 3.2%;
  transform: rotate(3.5deg);
  filter:
    drop-shadow(0 12px 20px rgba(14, 27, 66, 0.34))
    drop-shadow(0 0 10px rgba(217, 11, 114, 0.22));
  animation: dsCmGentleSwing 6.4s ease-in-out infinite;
}

.ds-cm-hang-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Variant A: Homepage "130+ Online Courses" top-right corner */
.ds-cm-hang-tag--hero {
  top: -10px;
  right: -14px;
  width: 78px;
}

/* Variant B: Compact tag on eligible course cards */
.ds-card-thumb,
.ds-card-thumb-wrap {
  position: relative;
}

.ds-cm-hang-tag--card {
  top: -6px;
  right: 10px;
  width: 54px;
  z-index: 9;
}

.ds-cm-hang-tag--card .ds-cm-hang-pendulum {
  filter:
    drop-shadow(0 8px 14px rgba(14, 27, 66, 0.32))
    drop-shadow(0 0 6px rgba(217, 11, 114, 0.2));
}

/* Variant C: Eligible course detail page hero/header */
.ds-course-hero--cm-host {
  position: relative;
}

.ds-cm-hang-tag--course-hero {
  top: -6px;
  right: 20px;
  width: 68px;
  z-index: 12;
}

/* Variant D: Optional welcome popup */
.ds-cm-hang-tag--popup {
  top: -14px;
  left: -16px;
  width: 76px;
  z-index: 25;
}

@keyframes dsCmGentleSwing {
  0%, 100% {
    transform: rotate(3.5deg);
  }
  50% {
    transform: rotate(-2.5deg);
  }
}

/* Respect reduced motion and keep touch devices calm/static */
@media (prefers-reduced-motion: reduce) {
  .ds-cm-hang-pendulum {
    animation: none !important;
    transform: rotate(3.5deg);
  }
}

@media (hover: none), (pointer: coarse) {
  .ds-cm-hang-pendulum {
    animation: none !important;
    transform: rotate(3deg);
  }
}

/* Responsive sizing: zero clipping, zero horizontal overflow down to 320px */
@media (max-width: 1199px) {
  .ds-cm-hang-tag--hero {
    top: -8px;
    right: -4px;
    width: 64px;
  }
  .ds-cm-hang-tag--course-hero {
    top: -4px;
    right: 14px;
    width: 60px;
  }
}

@media (max-width: 767px) {
  .ds-cm-hang-tag--hero {
    top: -6px;
    right: 8px;
    width: 56px;
  }
  .ds-cm-hang-tag--card {
    top: -4px;
    right: 8px;
    width: 48px;
  }
  .ds-cm-hang-tag--course-hero {
    top: 4px;
    right: 12px;
    width: 52px;
  }
}

@media (max-width: 360px) {
  .ds-cm-hang-tag--hero {
    top: -4px;
    right: 6px;
    width: 50px;
  }
  .ds-cm-hang-tag--course-hero {
    top: 4px;
    right: 8px;
    width: 46px;
  }
}

/* ==========================================================================
   3. OPTIONAL WELCOME POPUP (DISPLAY-ONLY)
   ========================================================================== */
.ds-cm-modal-stage {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 27, 66, 0.68);
  backdrop-filter: blur(4px);
}

.ds-cm-modal-stage.is-open {
  display: flex;
}

.ds-cm-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.ds-cm-modal-surface {
  position: relative;
  background: linear-gradient(155deg, #0e1b42 0%, #2d1247 58%, #641554 100%);
  border: 1px solid rgba(255, 168, 214, 0.45);
  border-radius: 22px;
  padding: 36px 28px 28px;
  color: #ffffff !important;
  text-align: center;
  box-shadow: 0 24px 56px rgba(7, 13, 35, 0.52);
}

#dsCmModalStage span,
#dsCmModalStage h2,
#dsCmModalStage p,
#dsCmModalStage a,
#dsCmModalStage button {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.ds-cm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-size: 20px !important;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-cm-modal-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(217, 11, 114, 0.36);
  border: 1px solid rgba(255, 192, 224, 0.58);
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ds-cm-modal-heading {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 10px;
  line-height: 1.2 !important;
}

.ds-cm-modal-copy {
  font-size: 14.5px !important;
  color: rgba(248, 250, 252, 0.92) !important;
  -webkit-text-fill-color: rgba(248, 250, 252, 0.92) !important;
  margin: 0 0 22px;
  line-height: 1.55 !important;
}

.ds-cm-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d90b72 0%, #a8005e 100%);
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(217, 11, 114, 0.34);
}
