/* TickGiveaway coupon / deal box for Rehub [wpsm_offerbox]. */

/* Outer frame: intro header + offerbox list share one border. */
.tgiv-coupon-section {
  margin: 20px 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

/* Intro strip sits flush at the top of the frame (its rounded corners
   and outer border come from .tgiv-coupon-section). */
.tgiv-coupon-section__header {
  margin: 0;
  padding: 12px 16px;
  background: #fff8ed;
  border-bottom: 1px solid #ffe0b3;
  color: #7a4500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.tgiv-coupon-section__header strong {
  color: #5a3500;
}

.tgiv-coupon-section__header p {
  margin: 0 0 6px;
}

.tgiv-coupon-section__header p:last-child {
  margin: 0;
}

/* Footer = any text that appeared AFTER the offerboxes, rendered below the
   list (never hoisted up into the intro header). */
.tgiv-coupon-section__footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 13px;
  line-height: 1.55;
}

.tgiv-coupon-section__footer p {
  margin: 0 0 6px;
}

.tgiv-coupon-section__footer p:last-child {
  margin: 0;
}

.tgiv-coupon-list {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin: 20px 0;
  overflow: hidden;
}

.tgiv-coupon-list--single {
  margin: 14px 0;
}

/* Inside the shared frame the list drops its own border/radius/margin -
   the frame provides them. Standalone --single boxes keep theirs. */
.tgiv-coupon-section .tgiv-coupon-list {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.tgiv-coupon-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.tgiv-coupon-item:last-child {
  border-bottom: 0;
}

.tgiv-coupon-item:hover {
  background: #fffaf6;
}

.tgiv-coupon-item--best {
  background: #fffaf6;
  position: relative;
}

.tgiv-coupon-item--best::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ff4e0c;
}

.tgiv-coupon-item--best:hover {
  background: #fff5ea;
}

.tgiv-coupon-item--expired {
  opacity: .55;
}

.tgiv-coupon-item--expired .tgiv-coupon-code,
.expired_coupon.tgiv-coupon-code {
  pointer-events: none;
  cursor: not-allowed;
}

.tgiv-coupon-item__discount {
  flex: 0 0 auto;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tgiv-coupon-item__discount-value {
  color: #ff4e0c;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
}

.tgiv-coupon-item__discount--free .tgiv-coupon-item__discount-value {
  color: #10b981;
  font-size: 18px;
}

.tgiv-coupon-item__discount-label {
  color: #999;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-top: 2px;
  text-transform: uppercase;
}

.tgiv-coupon-item__info {
  flex: 1 1 auto;
  min-width: 0;
}

/* `.tgiv-coupon-list` prefix raises specificity above Rehub's
   `article p, .post p { margin:0 0 31px }` (which otherwise wins and
   pushes the title/desc out of vertical centre). */
.tgiv-coupon-list .tgiv-coupon-item__title {
  color: #222;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgiv-coupon-list .tgiv-coupon-item__desc {
  color: #888;
  font-size: 12.5px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgiv-coupon-item__price {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.tgiv-coupon-item__price-new {
  color: #10b981;
  font-size: 19px;
  font-weight: 700;
}

.tgiv-coupon-item__price-old {
  color: #aaa;
  font-size: 12px;
  margin-top: 1px;
  text-decoration: line-through;
}

.tgiv-coupon-item__meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.tgiv-coupon-item__uses {
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.tgiv-coupon-item__expires {
  color: #999;
  font-size: 11.5px;
  white-space: nowrap;
}

.tgiv-coupon-code {
  flex: 0 0 auto;
  position: relative;
  display: block;
  width: 170px;
  max-width: 170px;
  height: 40px;
  cursor: pointer;
  margin-left: auto;
  user-select: none;
}

.tgiv-coupon-code__peek {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 14px;
  overflow: hidden;
  background: #f0f4ff;
  border: 1.5px dashed #7ba0ff;
  border-radius: 5px;
  color: #a0aed1;
  font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

/* The code text truncates with an ellipsis instead of breaking the row when
   it's unusually long - the full value is still copied from data-tgiv-code. */
.tgiv-coupon-code__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgiv-coupon-code__btn {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 68%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff4e0c;
  border-radius: 5px;
  box-shadow: 2px 0 6px rgba(255, 78, 12, .2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease;
}

.tgiv-coupon-code:hover .tgiv-coupon-code__btn {
  background: #e0440a;
}

.tgiv-coupon-code.is-revealed {
  cursor: pointer;
}

.tgiv-coupon-code.is-revealed .tgiv-coupon-code__btn {
  display: none;
}

.tgiv-coupon-code.is-revealed .tgiv-coupon-code__peek,
.tgiv-coupon-code--plain .tgiv-coupon-code__peek {
  justify-content: center;
  padding-right: 0;
  background: #f0f4ff;
  border-color: #4a80f0;
  color: #2a5cf0;
}

.tgiv-coupon-code--plain {
  cursor: pointer;
}

.tgiv-coupon-code--copied .tgiv-coupon-code__peek {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
}

.tgiv-coupon-deal {
  flex: 0 0 auto;
  display: block;
  width: 170px;
  max-width: 170px;
  margin-left: auto;
  text-decoration: none;
}

.tgiv-coupon-deal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.tgiv-coupon-deal-btn--ghost {
  background: #fff;
  border: 1.5px solid #ff4e0c;
  color: #ff4e0c;
}

.tgiv-coupon-deal:hover .tgiv-coupon-deal-btn--ghost {
  background: #fff5ea;
  color: #e0440a;
}

.tgiv-coupon-deal-btn--free {
  background: #ff4e0c;
  box-shadow: 2px 0 6px rgba(255, 78, 12, .2);
  color: #fff;
}

.tgiv-coupon-deal:hover .tgiv-coupon-deal-btn--free {
  background: #e0440a;
}

#pgwModal.tickgiveaway-coupon-reveal-popup .pm-content,
#pgwModal.coupon-reveal-popup .pm-content {
  padding: 0;
}

.tickgiveaway-coupon-modal-content {
  overflow: hidden;
  text-align: center;
}

.tickgiveaway-coupon-modal-top {
  background: linear-gradient(135deg, #4a80f0 0%, #7657f6 100%);
  color: #fff;
  padding: 24px 22px 28px;
}

.tickgiveaway-coupon-modal-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 8px;
}

.tickgiveaway-coupon-modal-subtitle {
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 auto 18px;
  max-width: 390px;
}

.tickgiveaway-coupon-modal-code {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  background: #fff;
  border: 2px dashed rgba(255, 255, 255, .7);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 24, 45, .16);
  overflow: hidden;
}

.tickgiveaway-coupon-modal-code input {
  width: 230px;
  max-width: 56vw;
  border: 0;
  background: #fff;
  color: #222;
  font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 12px 14px;
  text-align: center;
}

.tickgiveaway-coupon-modal-copy {
  border: 0;
  background: #ff4e0c;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 18px;
  transition: background .15s ease;
}

.tickgiveaway-coupon-modal-copy:hover {
  background: #e0440a;
}

.tickgiveaway-coupon-modal-copy.is-copying {
  opacity: .82;
}

.tickgiveaway-coupon-modal-copy.is-copied {
  background: #10b981;
}

.tickgiveaway-coupon-modal-copy.is-copy-failed {
  background: #dc2626;
}

.tickgiveaway-coupon-modal-bottom {
  background: #fff;
  padding: 22px;
}

.tickgiveaway-coupon-modal-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 24px;
  background: #ff4e0c;
  border-radius: 6px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
}

.tickgiveaway-coupon-modal-go:hover {
  background: #e0440a;
}

/* Shown when the affiliate tab was blocked: nudge the user toward the CTA. */
.tickgiveaway-coupon-modal-go.is-fallback {
  animation: tickgiveaway-cta-pulse 1.1s ease-in-out 3;
}

@keyframes tickgiveaway-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 78, 12, .5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 78, 12, 0); }
}

.tickgiveaway-coupon-modal-help {
  color: #777;
  font-size: 13px;
  line-height: 1.45;
  margin: 14px 0 0;
}

@media (max-width: 720px) {
  .tgiv-coupon-item {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .tgiv-coupon-item__discount {
    min-width: 48px;
  }

  .tgiv-coupon-item__discount-value {
    font-size: 22px;
  }

  .tgiv-coupon-item__info {
    flex: 1 1 60%;
    order: 1;
  }

  .tgiv-coupon-item__price {
    align-items: flex-end;
    order: 2;
  }

  .tgiv-coupon-item__meta {
    flex-direction: row;
    gap: 10px;
    font-size: 11px;
    order: 4;
  }

  .tgiv-coupon-code,
  .tgiv-coupon-deal {
    min-width: 150px;
    order: 3;
    width: 150px;
  }

  .tgiv-coupon-item__title {
    font-size: 14px;
  }

  .tgiv-coupon-item__price-new {
    font-size: 17px;
  }
}

