/* File: ui-cards.css
   Description: Card layout/styles for offer and giveaway cards. Button visuals live in buttons.css.
*/

.offer-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
}

.offer-card {
  position: relative;
  flex: 1 1 calc(33.33% - 16px);
  max-width: calc(33.33% - 16px);
  height: 400px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  overflow: hidden;
}

.offer-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.offer-card-front,
.offer-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
  box-sizing: border-box;
}

.offer-card-front {
  background-color: #fff;
  z-index: 2;
}

.offer-card-back {
  background-color: #fff;
  transform: rotateY(180deg);
  z-index: 1;
}


/* Compatibility face primitive for legacy card markup. */
.offer-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.offer-card.flipped .offer-card-inner {
  transform: rotateY(180deg);
}

.offer-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.confirmation-message {
  color: red;
  font-weight: bold;
  line-height: 1.3;
  margin-top: 10px;
  text-align: center;
}

.offer-card h3,
.offer-card p,
.offer-card button {
  margin: 12px 0;
  font-size: 1em;
  text-align: center;
}

/* Layout only - no button visuals here */
.offer-card button,
.optin-button,
.giveaway-view-details {
  display: block;
  width: 100%;
}

.offer-card-back h3 {
  margin-bottom: 16px;
  text-align: center;
}

.offer-card-back .giveaway-details,
.offer-card-back p {
  text-align: left;
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 14px;
}

.offer-card-back p strong {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.close-card {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, color 0.3s;
}

.close-card:hover {
  background: #f0f0f0;
  color: #333;
}

@media (max-width: 768px) {
  .offer-cards {
    justify-content: center;
  }

  .offer-card {
    flex: 0 1 min(360px, 92vw);
    max-width: min(360px, 92vw);
    width: min(360px, 92vw);
    height: auto;
    min-height: 400px;
  }

  .offer-card-front,
  .offer-card-back {
    position: relative;
    height: auto;
    min-height: 400px;
  }

  .offer-card img {
    aspect-ratio: 4 / 3;
  }
}

/* Subscriber dashboard wallet: purchases + coupons */
.ll-subscriber-wallet {
  max-width: 1100px;
  margin: 0 auto;
}

.ll-wallet-intro {
  margin-bottom: 24px;
}

.ll-wallet-intro h2 {
  margin: 0 0 6px;
}

.ll-wallet-intro p {
  margin: 0;
  color: #555;
}

.ll-wallet-group + .ll-wallet-group {
  margin-top: 32px;
}

.ll-wallet-group__title {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.ll-wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ll-wallet-card,
.ll-wallet-empty,
.ll-wallet-detail {
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.ll-wallet-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ll-wallet-card__topline,
.ll-wallet-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ll-wallet-kind {
  color: #666;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ll-wallet-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid #b7b7b7;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f5f5f5;
  color: #333;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.ll-wallet-status--available,
.ll-wallet-status--active,
.ll-wallet-status--partially_redeemed,
.ll-wallet-status--sent {
  border-color: #7eac83;
  background: #eef8ef;
  color: #1f5d28;
}

.ll-wallet-status--used,
.ll-wallet-status--redeemed {
  border-color: #9aa7b2;
  background: #f2f5f7;
  color: #3d4a54;
}

.ll-wallet-status--unavailable,
.ll-wallet-status--expired,
.ll-wallet-status--cancelled,
.ll-wallet-status--refunded {
  border-color: #c9a4a4;
  background: #fbf1f1;
  color: #7a2f2f;
}

.ll-wallet-card__business {
  margin-top: 16px;
  color: #555;
  font-size: 0.92rem;
  font-weight: 600;
}

.ll-wallet-card h3 {
  margin: 5px 0 12px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.ll-wallet-card__value {
  margin: 2px 0 0;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}

.ll-wallet-card__balance {
  margin-top: 6px;
  font-weight: 700;
}

.ll-wallet-card__meta {
  display: grid;
  gap: 5px;
  margin: 14px 0 18px;
  color: #555;
  font-size: 0.9rem;
}

.ll-wallet-card .ll-btn {
  width: 100%;
  margin-top: auto;
  text-align: center;
  box-sizing: border-box;
}

.ll-wallet-empty {
  padding: 28px;
  text-align: center;
}

.ll-wallet-empty h3 {
  margin: 0 0 8px;
}

.ll-wallet-empty p {
  max-width: 620px;
  margin: 0 auto;
  color: #555;
}

.ll-wallet-detail {
  max-width: 720px;
  padding: 24px;
}

.ll-wallet-back {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  text-decoration: none;
}

.ll-wallet-detail__header h3 {
  margin: 5px 0 16px;
}

.ll-wallet-code {
  margin: 18px 0;
  padding: 20px;
  border: 2px dashed #333;
  border-radius: 10px;
  background: #f8f8f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.ll-wallet-detail__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.ll-wallet-detail__facts > div {
  padding: 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

.ll-wallet-detail__facts dt {
  color: #666;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ll-wallet-detail__facts dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.ll-wallet-notice {
  margin: 18px 0;
  padding: 14px;
  border-radius: 8px;
  background: #f5f5f5;
}

.ll-wallet-notice--success {
  background: #eef8ef;
  color: #1f5d28;
}

@media (max-width: 900px) {
  .ll-wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ll-wallet-grid,
  .ll-wallet-detail__facts {
    grid-template-columns: 1fr;
  }

  .ll-wallet-card,
  .ll-wallet-detail,
  .ll-wallet-empty {
    padding: 16px;
  }

  .ll-wallet-detail__header {
    flex-direction: column;
  }
}


/* Subscriber dashboard secure email access */
.ll-dashboard-access-card {
  max-width: 680px;
  margin: 24px auto;
  padding: 28px;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ll-dashboard-access-card__copy h2 {
  margin: 0 0 8px;
}

.ll-dashboard-access-card__copy p {
  margin: 0 0 10px;
}

.ll-dashboard-access-card__note {
  color: #555;
  font-size: 0.92rem;
}

.ll-dashboard-access-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.ll-dashboard-access-form label {
  font-weight: 700;
}

.ll-dashboard-access-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 12px;
}

.ll-dashboard-access-form .ll-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.ll-dashboard-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #f7f7f7;
  color: #444;
  font-size: 0.9rem;
}

.ll-dashboard-identity-bar form {
  margin: 0;
}

.ll-dashboard-identity-bar__change {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2271b1;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ll-dashboard-access-card {
    padding: 18px;
  }

  .ll-dashboard-identity-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}
