/* ==========================================================
   Coupons page (Cashora-like visual)
   ========================================================== */


.cashora-vouchers {
  padding-bottom: 8px;
}

.cv-hero {
  border: 1px solid #dfe0e4;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f8fb 100%);
  padding: 16px;
}

.cv-hero__brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.cv-hero__logo-wrap {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  border: 1px solid #dfe0e4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 74px;
  overflow: hidden;
}

.cv-hero__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.cv-hero__logo-icon {
  font-size: 30px;
  color: #404a60;
}

.cv-hero__copy h1 {
  margin: 0;
  color: #222e48;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 800;
}

.cv-hero__copy h2 {
  margin: 5px 0 0;
  color: #404a60;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
}

.cv-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cv-filter {
  border: 1px solid #dfe0e4;
  background: #fff;
  color: #404a60;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: all .2s ease;
}

.cv-filter:hover {
  border-color: #cd3d1c;
  color: #cd3d1c;
}

.cv-filter.is-active {
  border-color: #cd3d1c;
  background: #cd3d1c;
  color: #fff;
  box-shadow: 0 8px 18px rgba(205, 61, 28, .25);
}

.cv-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-card {
  border: 1px solid #dfe0e4;
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 210px;
  gap: 14px;
  padding: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cv-card:hover {
  border-color: rgba(205, 61, 28, .5);
  box-shadow: 0 12px 24px rgba(2, 24, 20, .08);
  transform: translateY(-1px);
}

.cv-card__badge {
  border-radius: 12px;
  border: 1px solid #dfe0e4;
  background: linear-gradient(180deg, #ffe9d8 0%, #ffd9b4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  min-height: 102px;
}

.cv-card__amount {
  color: #222e48;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
}

.cv-card__amount-sub {
  color: #404a60;
  font-size: 12px;
  font-weight: 700;
}

.cv-card__content {
  min-width: 0;
}

.cv-card__labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.cv-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid #dfe0e4;
  padding: 4px 8px;
  background: #f5f6f7;
  color: #404a60;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.cv-chip--verified {
  background: #e8f9ef;
  border-color: #bde7cd;
  color: #2b7a44;
}

.cv-chip--kind {
  background: #eef6ff;
  border-color: #c9dcf5;
  color: #1e4f84;
}

.cv-card__title {
  margin: 0;
  color: #222e48;
  font-weight: 800;
  line-height: 1.32;
  font-size: 18px;
}

.cv-card__desc {
  margin: 8px 0 0;
  color: #404a60;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cv-card__footer {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cv-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cv-meta-btn {
  border: 1px solid #dfe0e4;
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #404a60;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.cv-meta-btn:hover {
  color: #cd3d1c;
  border-color: #cd3d1c;
}

.cv-card__expires {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #69768f;
}

.cv-card__expires.is-soon {
  color: #b44b3b;
}

.cv-card__action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

.cv-reveal-btn {
  width: 100%;
  border-radius: 14px;
  border: 1px dashed #cd3d1c;
  background: linear-gradient(135deg, #fff5f1 0%, #ffe4d8 100%);
  min-height: 52px;
  position: relative;
  overflow: hidden;
  padding: 0 14px;
  text-align: left;
}

.cv-reveal-btn__code,
.cv-reveal-btn__show {
  font-size: 15px;
  font-weight: 900;
  line-height: 52px;
  letter-spacing: .3px;
  text-transform: uppercase;
  transition: transform .25s ease, opacity .2s ease;
  display: block;
}

.cv-reveal-btn__code {
  color: #222e48;
  transform: translateY(0);
}

.cv-reveal-btn__show {
  color: #fff;
  background: #cd3d1c;
  position: absolute;
  inset: 0;
  text-align: center;
  transform: translateY(100%);
}

.cv-reveal-btn:hover .cv-reveal-btn__code {
  transform: translateY(-100%);
  opacity: 0;
}

.cv-reveal-btn:hover .cv-reveal-btn__show {
  transform: translateY(0);
}

.cv-more-btn {
  border: 1px solid #dfe0e4;
  background: #fff;
  color: #404a60;
  border-radius: 999px;
  height: 38px;
  font-size: 13px;
  font-weight: 700;
}

.cv-more-btn:hover {
  border-color: #cd3d1c;
  color: #cd3d1c;
}

.cv-go-store {
  background: #cd3d1c !important;
  color: #fff !important;
  border: 1px solid #cd3d1c !important;
}

.cv-go-store:hover {
  background: #b23417 !important;
  border-color: #b23417 !important;
  color: #fff !important;
}

.cv-empty {
  border: 1px dashed #dfe0e4;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: #69768f;
  font-weight: 600;
  background: #fff;
}

/* ===== Modal ===== */
.cv-modal[hidden] {
  display: none;
}

.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.cv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 24, .58);
  backdrop-filter: blur(2px);
}

.cv-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 24px));
  margin: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #dfe0e4;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .30);
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.cv-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #dfe0e4;
  background: #fff;
  color: #404a60;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.cv-modal__close:hover {
  color: #cd3d1c;
  border-color: #cd3d1c;
}

.cv-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 34px;
}

.cv-modal__logo {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #dfe0e4;
  background: #fff;
  padding: 8px;
}

.cv-modal__store {
  margin: 0;
  color: #69768f;
  font-size: 13px;
  font-weight: 600;
}

.cv-modal__title {
  margin: 4px 0 0;
  color: #222e48;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
}

.cv-modal__code-wrap {
  border: 1px dashed #cd3d1c;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f1 0%, #ffe4d8 100%);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.cv-modal__code {
  font-size: 21px;
  font-weight: 900;
  color: #222e48;
  letter-spacing: .8px;
}

.cv-modal__copy,
.cv-modal__go {
  height: 42px;
  border-radius: 999px;
  border: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.cv-modal__copy {
  background: #cd3d1c;
  color: #fff;
}

.cv-modal__copy:hover {
  background: #b23417;
}

.cv-modal__cta-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cv-modal__go {
  background: #0b453c;
  color: #fff;
}

.cv-modal__go:hover {
  background: #082f29;
}

.cv-modal__expire {
  color: #69768f;
  font-size: 13px;
  font-weight: 600;
}

.cv-modal__vote {
  margin-top: 16px;
  border-top: 1px solid #dfe0e4;
  padding-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #1f2a44;
  font-weight: 700;
}

.cv-vote-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid #94a3b8;
  background: #f8fafc;
  color: #1f2a44;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}

.cv-vote-btn:hover,
.cv-vote-btn.is-selected {
  transform: translateY(-1px);
}

#couponModalVoteYes:hover,
#couponModalVoteYes.is-selected {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}

#couponModalVoteNo:hover,
#couponModalVoteNo.is-selected {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

body.cv-modal-open {
  overflow: hidden;
}

/* ===== Dark ===== */
html[data-theme="dark"] .cv-hero,
html.dark .cv-hero {
  border-color: #222a3b;
  background: linear-gradient(135deg, #111828 0%, #0e1320 100%);
}

html[data-theme="dark"] .cv-hero__logo-wrap,
html.dark .cv-hero__logo-wrap,
html[data-theme="dark"] .cv-filter,
html.dark .cv-filter,
html[data-theme="dark"] .cv-card,
html.dark .cv-card,
html[data-theme="dark"] .cv-meta-btn,
html.dark .cv-meta-btn,
html[data-theme="dark"] .cv-more-btn,
html.dark .cv-more-btn,
html[data-theme="dark"] .cv-empty,
html.dark .cv-empty,
html[data-theme="dark"] .cv-modal__dialog,
html.dark .cv-modal__dialog,
html[data-theme="dark"] .cv-modal__logo,
html.dark .cv-modal__logo,
html[data-theme="dark"] .cv-modal__close,
html.dark .cv-modal__close,
html[data-theme="dark"] .cv-vote-btn,
html.dark .cv-vote-btn {
  background-color: #0f1728;
  border-color: #222a3b;
}

html[data-theme="dark"] .cv-hero__copy h1,
html.dark .cv-hero__copy h1,
html[data-theme="dark"] .cv-card__title,
html.dark .cv-card__title,
html[data-theme="dark"] .cv-reveal-btn__code,
html.dark .cv-reveal-btn__code,
html[data-theme="dark"] .cv-modal__title,
html.dark .cv-modal__title,
html[data-theme="dark"] .cv-modal__code,
html.dark .cv-modal__code {
  color: #e9eefc;
}

html[data-theme="dark"] .cv-hero__copy h2,
html.dark .cv-hero__copy h2,
html[data-theme="dark"] .cv-filter,
html.dark .cv-filter,
html[data-theme="dark"] .cv-card__desc,
html.dark .cv-card__desc,
html[data-theme="dark"] .cv-card__expires,
html.dark .cv-card__expires,
html[data-theme="dark"] .cv-modal__store,
html.dark .cv-modal__store,
html[data-theme="dark"] .cv-modal__expire,
html.dark .cv-modal__expire,
html[data-theme="dark"] .cv-modal__vote,
html.dark .cv-modal__vote,
html[data-theme="dark"] .cv-meta-btn,
html.dark .cv-meta-btn,
html[data-theme="dark"] .cv-more-btn,
html.dark .cv-more-btn {
  color: #b1bdd8;
}

html[data-theme="dark"] .cv-chip,
html.dark .cv-chip {
  background: #151f34;
  border-color: #26314a;
  color: #b8c3dc;
}

html[data-theme="dark"] .cv-card__badge,
html.dark .cv-card__badge {
  background: linear-gradient(180deg, #332a1f 0%, #201912 100%);
  border-color: #4a3a2b;
}

html[data-theme="dark"] .cv-filter.is-active,
html.dark .cv-filter.is-active,
html[data-theme="dark"] .cv-reveal-btn__show,
html.dark .cv-reveal-btn__show,
html[data-theme="dark"] .cv-modal__copy,
html.dark .cv-modal__copy {
  background: #cd3d1c;
  color: #fff;
}

html[data-theme="dark"] .cv-reveal-btn,
html.dark .cv-reveal-btn,
html[data-theme="dark"] .cv-modal__code-wrap,
html.dark .cv-modal__code-wrap {
  background: #1e2538;
  border-color: #8d3c2f;
}

html[data-theme="dark"] .cv-modal__vote,
html.dark .cv-modal__vote {
  color: #e2e8f0;
}

html[data-theme="dark"] .cv-vote-btn,
html.dark .cv-vote-btn {
  background: #1f2937;
  border-color: #64748b;
  color: #f8fafc;
}

html[data-theme="dark"] #couponModalVoteYes:hover,
html[data-theme="dark"] #couponModalVoteYes.is-selected,
html.dark #couponModalVoteYes:hover,
html.dark #couponModalVoteYes.is-selected {
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}

html[data-theme="dark"] #couponModalVoteNo:hover,
html[data-theme="dark"] #couponModalVoteNo.is-selected,
html.dark #couponModalVoteNo:hover,
html.dark #couponModalVoteNo.is-selected {
  background: #ef4444;
  border-color: #dc2626;
  color: #fff;
}

html[data-theme="dark"] .cv-modal__go,
html.dark .cv-modal__go {
  background: #f7b133;
  color: #0c1220;
}

html[data-theme="dark"] .cv-modal__go:hover,
html.dark .cv-modal__go:hover {
  background: #ffc455;
}

/* ===== Responsive ===== */
@media (max-width: 1023.98px) {
  .cv-card {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .cv-card__action {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 639.98px) {
  .cv-hero__copy h1 {
    font-size: 20px;
  }

  .cv-hero__copy h2 {
    font-size: 14px;
  }

  .cv-card {
    grid-template-columns: 1fr;
  }

  .cv-card__badge {
    min-height: 70px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
  }

  .cv-modal__dialog {
    width: 100%;
    padding: 14px;
    max-height: calc(100vh - 16px);
  }

  .cv-modal__code-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
