/* Pentamarket Flash Sale V1
   Scoped styles only. Visual source follows desain_flashsale.html. */

#penta-flash-sale-mount {
  width: 100%;
}

#penta-flash-sale-mount:empty {
  display: none;
}

#penta-flash-sale-mount .penta-flash-sale,
#penta-flash-sale-mount .penta-flash-sale * {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

#penta-flash-sale-mount .penta-flash-sale {
  width: 100%;
  overflow: hidden;
  background: #120F22;
  border: 1px solid #27272a;
  border-radius: 16px;
}

#penta-flash-sale-mount .penta-flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  background: #0D1424;
  border-bottom: 1px solid #27272a;
}

#penta-flash-sale-mount .penta-flash-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#penta-flash-sale-mount .penta-flash-bolt {
  width: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#penta-flash-sale-mount .penta-flash-bolt svg {
  width: 27px;
  height: 27px;
  display: block;
  color: #facc15;
  transform: rotate(-8deg);
  animation: pentaBoltFlash 1.3s ease-in-out infinite;
}

@keyframes pentaBoltFlash {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  15% { transform: rotate(-10deg) scale(1.18); }
  28% { transform: rotate(-6deg) scale(.93); }
  42% { transform: rotate(-9deg) scale(1.12); }
  60% { transform: rotate(-8deg) scale(1); }
}

#penta-flash-sale-mount .penta-flash-event-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: #d9dc24;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
}

#penta-flash-sale-mount .penta-flash-title-area h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

#penta-flash-sale-mount .penta-indonesia-flag {
  width: 18px;
  height: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #3f3f46;
  border-radius: 2px;
  flex-shrink: 0;
}

#penta-flash-sale-mount .penta-indonesia-flag span {
  width: 100%;
  height: 50%;
}

#penta-flash-sale-mount .penta-indonesia-flag span:first-child {
  background: #ef4444;
}

#penta-flash-sale-mount .penta-indonesia-flag span:last-child {
  background: #ffffff;
}

#penta-flash-sale-mount .penta-flash-countdown {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}

#penta-flash-sale-mount .penta-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#penta-flash-sale-mount .penta-flip-card {
  position: relative;
  width: 43px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #3f3f46;
  border-radius: 9px;
  perspective: 500px;
  transform-style: preserve-3d;
}

#penta-flash-sale-mount .penta-flip-value {
  position: relative;
  z-index: 2;
  color: #f4f4f5;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .4px;
}

#penta-flash-sale-mount .penta-flip-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  z-index: 3;
  background: #27272a;
}

#penta-flash-sale-mount .penta-flip-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 4;
  background: #0D1424;
  border-bottom: 1px solid #27272a;
  opacity: 0;
  transform-origin: bottom;
  pointer-events: none;
}

#penta-flash-sale-mount .penta-flip-card.is-flipping::after {
  animation: pentaCalendarPageFlip .48s ease-in-out;
}

@keyframes pentaCalendarPageFlip {
  0% { opacity: .95; transform: rotateX(0deg) translateY(0); }
  42% { opacity: .9; transform: rotateX(-90deg) translateY(0); }
  70% { opacity: .5; transform: rotateX(-145deg) translateY(4px); }
  100% { opacity: 0; transform: rotateX(-180deg) translateY(10px); }
}

#penta-flash-sale-mount .penta-flip-card.is-flipping .penta-flip-value {
  animation: pentaFlipNumber .45s ease-in-out;
}

@keyframes pentaFlipNumber {
  0% { opacity: 1; transform: translateY(0); }
  42% { opacity: .4; transform: translateY(-3px); }
  55% { opacity: .4; transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}

#penta-flash-sale-mount .penta-countdown-label {
  color: #71717a;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .7px;
}

#penta-flash-sale-mount .penta-countdown-separator {
  padding-top: 7px;
  color: #52525b;
  font-size: 15px;
  font-weight: 600;
  animation: pentaSeparatorBlink 1s steps(1) infinite;
}

@keyframes pentaSeparatorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: .25; }
}

#penta-flash-sale-mount .penta-flash-marquee {
  width: 100%;
  overflow: hidden;
  padding: 13px 0;
}

#penta-flash-sale-mount .penta-flash-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding-left: 10px;
  animation: pentaSaleRunning var(--penta-sale-duration, 30s) linear infinite;
  will-change: transform;
}

#penta-flash-sale-mount .penta-flash-marquee:hover .penta-flash-track {
  animation-play-state: paused;
}

@keyframes pentaSaleRunning {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 5px)); }
}

#penta-flash-sale-mount .penta-sale-card {
  position: relative;
  width: 265px;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  background: #0D1424;
  border: 1px solid #27272a;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

#penta-flash-sale-mount .penta-sale-card:hover {
  background: #1c1c1f;
  border-color: rgba(190, 36, 220, .55);
  transform: translateY(-2px);
}

#penta-flash-sale-mount .penta-sale-logo {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #27272a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#penta-flash-sale-mount .penta-sale-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#penta-flash-sale-mount .penta-sale-logo-fallback {
  color: #71717a;
  font-size: 18px;
  font-weight: 700;
}

#penta-flash-sale-mount .penta-sale-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#penta-flash-sale-mount .penta-sale-name {
  max-width: 140px;
  overflow: hidden;
  color: #f4f4f5;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#penta-flash-sale-mount .penta-sale-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

#penta-flash-sale-mount .penta-old-price {
  color: #ef4444;
  font-size: 9px;
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 1.5px;
}

#penta-flash-sale-mount .penta-sale-price-now {
  color: #22c55e;
  font-size: 14px;
  font-weight: 700;
}

#penta-flash-sale-mount .penta-discount-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 3px 6px;
  background: rgba(190, 36, 220, .12);
  border: 1px solid rgba(190, 36, 220, .35);
  border-radius: 6px;
  color: #d946ef;
  font-size: 8px;
  font-weight: 700;
}

/* Checkout duration promo headband */
.penta-duration-promo-ribbon {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 3;
  min-width: 50px;
  padding: 4px 7px 4px 8px;
  border-radius: 0 11px 0 9px;
  background: #ef4444;
  border: 1px solid #f87171;
  color: #ffffff;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  text-align: center;
  box-shadow: 0 5px 13px -10px rgba(239, 68, 68, .9);
  pointer-events: none;
}

.penta-duration-promo-ribbon::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 0;
  height: 0;
  border-top: 4px solid #991b1b;
  border-left: 4px solid transparent;
}

/* Admin Promo toggle */
#penta-flash-sale-admin-control {
  width: min(100%, 540px);
  margin: 18px auto 0;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #0f172a;
  text-align: left;
}

#penta-flash-sale-admin-control .penta-admin-flash-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#penta-flash-sale-admin-control .penta-admin-flash-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid rgba(190, 36, 220, .3);
  background: rgba(190, 36, 220, .1);
  color: #d946ef;
}

#penta-flash-sale-admin-control .penta-admin-flash-icon svg {
  width: 18px;
  height: 18px;
}

#penta-flash-sale-admin-control .penta-admin-flash-copy {
  min-width: 0;
  flex: 1;
}

#penta-flash-sale-admin-control .penta-admin-flash-title {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

#penta-flash-sale-admin-control .penta-admin-flash-subtitle {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

#penta-flash-sale-admin-control .penta-admin-flash-toggle {
  position: relative;
  width: 48px;
  height: 27px;
  flex: 0 0 48px;
  border: 1px solid #475569;
  border-radius: 999px;
  background: #1e293b;
  cursor: pointer;
  transition: background-color .22s ease, border-color .22s ease;
}

#penta-flash-sale-admin-control .penta-admin-flash-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), background-color .22s ease;
}

#penta-flash-sale-admin-control .penta-admin-flash-toggle[data-enabled="true"] {
  border-color: rgba(190, 36, 220, .75);
  background: #BE24DC;
}

#penta-flash-sale-admin-control .penta-admin-flash-toggle[data-enabled="true"]::after {
  transform: translateX(21px);
  background: #ffffff;
}

#penta-flash-sale-admin-control .penta-admin-flash-toggle:disabled {
  cursor: wait;
  opacity: .58;
}

#penta-flash-sale-admin-control .penta-admin-flash-status {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #1e293b;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}

#penta-flash-sale-admin-control .penta-admin-flash-status.is-on {
  color: #4ade80;
}

#penta-flash-sale-admin-control .penta-admin-flash-status.is-warning {
  color: #facc15;
}

#penta-flash-sale-admin-control .penta-admin-flash-status.is-error {
  color: #f87171;
}

@media (max-width: 640px) {
  #penta-flash-sale-mount .penta-flash-sale {
    border-radius: 14px;
  }

  #penta-flash-sale-mount .penta-flash-header {
    gap: 8px;
    padding: 11px 9px;
  }

  #penta-flash-sale-mount .penta-flash-heading {
    gap: 6px;
  }

  #penta-flash-sale-mount .penta-flash-bolt {
    width: 19px;
  }

  #penta-flash-sale-mount .penta-flash-bolt svg {
    width: 20px;
    height: 20px;
  }

  #penta-flash-sale-mount .penta-flash-event-label {
    gap: 4px;
    font-size: 6px;
    letter-spacing: .4px;
  }

  #penta-flash-sale-mount .penta-indonesia-flag {
    width: 13px;
    height: 9px;
  }

  #penta-flash-sale-mount .penta-flash-title-area h2 {
    font-size: 13px;
  }

  #penta-flash-sale-mount .penta-flash-countdown {
    gap: 2px;
  }

  #penta-flash-sale-mount .penta-flip-card {
    width: 31px;
    height: 30px;
    border-radius: 7px;
  }

  #penta-flash-sale-mount .penta-flip-value {
    font-size: 11px;
  }

  #penta-flash-sale-mount .penta-countdown-label {
    font-size: 5px;
    letter-spacing: .3px;
  }

  #penta-flash-sale-mount .penta-countdown-separator {
    padding-top: 5px;
    font-size: 10px;
  }

  #penta-flash-sale-mount .penta-sale-card {
    width: 218px;
    min-height: 69px;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
  }

  #penta-flash-sale-mount .penta-sale-logo {
    width: 53px;
    height: 53px;
    border-radius: 10px;
  }

  #penta-flash-sale-mount .penta-sale-name {
    max-width: 110px;
    font-size: 10px;
  }

  #penta-flash-sale-mount .penta-old-price {
    font-size: 8px;
  }

  #penta-flash-sale-mount .penta-sale-price-now {
    font-size: 12px;
  }

  #penta-flash-sale-mount .penta-discount-badge {
    font-size: 7px;
    padding: 2px 5px;
  }

  #penta-flash-sale-mount .penta-flash-track {
    --penta-sale-duration: 25s;
  }
}

@media (max-width: 380px) {
  #penta-flash-sale-mount .penta-flash-header {
    gap: 5px;
  }

  #penta-flash-sale-mount .penta-flash-bolt {
    display: none;
  }

  #penta-flash-sale-mount .penta-flash-title-area h2 {
    font-size: 11px;
  }

  #penta-flash-sale-mount .penta-flash-event-label {
    font-size: 5px;
  }

  #penta-flash-sale-mount .penta-flip-card {
    width: 28px;
    height: 27px;
  }

  #penta-flash-sale-mount .penta-flip-value {
    font-size: 9px;
  }

  #penta-flash-sale-mount .penta-countdown-separator {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #penta-flash-sale-mount .penta-flash-track,
  #penta-flash-sale-mount .penta-flash-bolt svg,
  #penta-flash-sale-mount .penta-countdown-separator {
    animation: none;
  }

  #penta-flash-sale-mount .penta-sale-card,
  #penta-flash-sale-admin-control .penta-admin-flash-toggle,
  #penta-flash-sale-admin-control .penta-admin-flash-toggle::after {
    transition: none;
  }
}
