/* InnoPet floating coupon widget */
.innopet-coupon-widget {
  --cw-navy: #0b2b5a;
  --cw-navy-soft: #123f7a;
  --cw-orange: #f36b1c;
  --cw-line: rgba(15, 40, 80, 0.1);
  --cw-muted: #6b7c93;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10040;
  font-family: "Kanit", "Sarabun", sans-serif;
}
.innopet-coupon-widget__launcher,
.innopet-coupon-widget__copy,
.innopet-coupon-widget__close {
  font: inherit;
}
.innopet-coupon-widget__launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cw-orange) 0%, #e85a10 100%);
  color: #fff;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(243, 107, 28, 0.28);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.innopet-coupon-widget__launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(243, 107, 28, 0.34);
}
.innopet-coupon-widget__launcher-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-grid;
  place-items: center;
  font-weight: 600;
}
.innopet-coupon-widget__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(320px, calc(100vw - 28px));
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(243, 107, 28, 0.08), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(11, 43, 90, 0.06), transparent 50%),
    #ffffff;
  border: 1px solid var(--cw-line);
  border-radius: 20px;
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.24s ease, transform 0.24s ease;
  overflow: hidden;
}
.innopet-coupon-widget.is-open .innopet-coupon-widget__panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.innopet-coupon-widget__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.innopet-coupon-widget.is-depleted .innopet-coupon-widget__head {
  justify-content: flex-end;
  margin-bottom: 0;
}
.innopet-coupon-widget__eyebrow {
  margin: 0 0 3px;
  color: var(--cw-orange);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.innopet-coupon-widget__title {
  margin: 0;
  color: var(--cw-navy);
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 600;
}
.innopet-coupon-widget__close {
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 40, 80, 0.05);
  color: var(--cw-muted);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.innopet-coupon-widget__close:hover {
  background: rgba(15, 40, 80, 0.1);
  color: var(--cw-navy);
}
.innopet-coupon-widget__cards {
  display: grid;
  gap: 10px;
}
.innopet-coupon-widget__card {
  background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 11px;
}
.innopet-coupon-widget__label {
  margin: 0 0 6px;
  color: #5b6b7c;
  font-size: 0.76rem;
  font-weight: 500;
}
.innopet-coupon-widget__code-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 7px;
}
.innopet-coupon-widget__code {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px dashed rgba(11, 43, 90, 0.22);
  background: #fff;
  color: var(--cw-navy);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.innopet-coupon-widget__desc {
  margin: 0;
  color: #5b6b7c;
  font-size: 0.8rem;
  line-height: 1.35;
}
.innopet-coupon-widget__copy {
  width: auto;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  background: var(--cw-navy);
  color: #fff;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0 12px;
  cursor: pointer;
}
.innopet-coupon-widget__copy.is-copied {
  background: #15803d;
}
.innopet-coupon-widget__hint {
  margin: 10px 0 0;
  color: #6b7a90;
  font-size: 0.76rem;
  line-height: 1.4;
}
.innopet-coupon-widget__status {
  margin: 6px 0 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: #15803d;
}
.innopet-coupon-widget__status.is-error {
  color: #b42318;
}

/* Depleted / sold-out empty state */
.innopet-coupon-widget__empty {
  position: relative;
  text-align: center;
  padding: 8px 4px 4px;
  z-index: 1;
}
.innopet-coupon-widget__empty-glow {
  position: absolute;
  inset: 8% 12% auto;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(243, 107, 28, 0.18), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.innopet-coupon-widget__empty-icon {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 4px auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--cw-navy);
  background: linear-gradient(160deg, #fff 0%, #eef3fb 100%);
  border: 1px solid var(--cw-line);
  box-shadow: 0 10px 24px rgba(11, 43, 90, 0.08);
}
.innopet-coupon-widget__empty-icon svg {
  width: 28px;
  height: 28px;
}
.innopet-coupon-widget__empty-kicker {
  margin: 0 0 4px;
  color: var(--cw-orange);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.innopet-coupon-widget__empty-title {
  margin: 0 0 6px;
  color: var(--cw-navy);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}
.innopet-coupon-widget__empty-desc {
  margin: 0 auto 14px;
  max-width: 24ch;
  color: var(--cw-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.innopet-coupon-widget__empty-chips {
  display: grid;
  gap: 8px;
}
.innopet-coupon-widget__chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(11, 43, 90, 0.18);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}
.innopet-coupon-widget__chip.is-gone {
  opacity: 0.72;
}
.innopet-coupon-widget__chip-code {
  color: var(--cw-navy);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(11, 43, 90, 0.35);
}
.innopet-coupon-widget__chip-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(11, 43, 90, 0.08);
  color: var(--cw-navy-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.innopet-coupon-widget.is-depleted .innopet-coupon-widget__launcher {
  background: linear-gradient(135deg, #7a889c 0%, #5f6f86 100%);
  box-shadow: 0 10px 22px rgba(47, 62, 84, 0.22);
}
.innopet-coupon-widget.is-depleted .innopet-coupon-widget__launcher:hover {
  box-shadow: 0 12px 24px rgba(47, 62, 84, 0.28);
}

@media (max-width: 640px) {
  .innopet-coupon-widget {
    right: 10px;
    left: auto;
    bottom: 10px;
  }
  .innopet-coupon-widget__launcher {
    width: auto;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .innopet-coupon-widget__launcher-icon {
    width: 18px;
    height: 18px;
    font-size: 0.72rem;
  }
  .innopet-coupon-widget__panel {
    width: min(268px, calc(100vw - 20px));
    max-height: min(62vh, 420px);
    overflow: auto;
    padding: 12px;
    border-radius: 16px;
  }
  .innopet-coupon-widget__head {
    margin-bottom: 8px;
    gap: 6px;
  }
  .innopet-coupon-widget__title {
    font-size: 0.92rem;
  }
  .innopet-coupon-widget__eyebrow {
    font-size: 0.62rem;
  }
  .innopet-coupon-widget__empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 10px;
  }
  .innopet-coupon-widget__empty-icon svg {
    width: 24px;
    height: 24px;
  }
  .innopet-coupon-widget__empty-title {
    font-size: 1rem;
  }
  .innopet-coupon-widget__empty-desc,
  .innopet-coupon-widget__chip-code {
    font-size: 0.78rem;
  }
  .innopet-coupon-widget__cards {
    gap: 7px;
  }
  .innopet-coupon-widget__card {
    padding: 8px;
    border-radius: 10px;
  }
  .innopet-coupon-widget__label,
  .innopet-coupon-widget__desc,
  .innopet-coupon-widget__hint,
  .innopet-coupon-widget__status {
    font-size: 0.68rem;
  }
  .innopet-coupon-widget__code-row {
    gap: 6px;
    margin-bottom: 4px;
  }
  .innopet-coupon-widget__code {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.82rem;
    border-radius: 8px;
    letter-spacing: 0.04em;
  }
  .innopet-coupon-widget__copy {
    font-size: 0.72rem;
    padding: 0 9px;
    border-radius: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .innopet-coupon-widget__panel,
  .innopet-coupon-widget__launcher {
    transition: none;
  }
}
