/* ============================= */
/*   Card info overlay (shared)  */
/* ============================= */

/* Cards need position context for absolute overlay and button */
.raffle-card,
.competition-card {
  position: relative;
}

/* Info button on cards – top-left, circle "i" */
.card-info-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  border: 1px solid var(--input-border, #ccc);
  background: var(--bg-white, #fff);
  color: var(--text-main, #1c1c1c);
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 0.9rem;
  font-weight: 600;
  font-style: italic;
  text-decoration: underline;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px var(--card-shadow, rgba(0, 0, 0, 0.05));
}

.card-info-btn:hover {
  background: var(--input-bg-default, #f5f5f5);
  border-color: var(--btn-add-to-cart-bg, #e4bc1c);
  box-shadow: 0 2px 6px var(--card-shadow-hover, rgba(0, 0, 0, 0.15));
}

.raffle-card-bottom-wrap,
.competition-card-bottom-wrap {
  position: relative;
}

/* Overlay covers full card; background matches card (no separate overlay colour) */
.card-info-overlay {
  position: absolute;
  inset: 0;
  background: inherit;
  /* padding: 1rem 1rem 2.5rem; */
  overflow: auto;
  z-index: 15;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  border-radius: 12px;
}

.card-info-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.card-info-overlay-content {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-main, #1c1c1c);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Overlay inner: stacked header (injected) + how-it-works (fixed) */
.card-info-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 3.5rem 1rem 1rem 1rem;
  overflow: auto;
}

/* Injected block: title + details (image optional) */
.card-info-overlay-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--input-border, rgba(0, 0, 0, 0.12));
}

.card-info-overlay-header-image {
  width: 100%;
  max-height: 88px;
  object-fit: contain;
  border-radius: 6px;
  background: transparent;
}

.card-info-overlay-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: var(--text-main, #1c1c1c);
}

/* Details strip: compact, small, bold, single line where possible */
.card-info-overlay-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0.2rem 0 0;
  color: var(--text-main, #1c1c1c);
}

.card-info-overlay-details-item {
  display: inline;
}

.card-info-overlay-details-item:not(:last-child)::after {
  content: '';
  margin-left: 0.15rem;
  font-weight: 700;
  color: var(--text-muted, #6e6e6e);
}

/* Fixed block: how it works + T&C */
.card-info-overlay-how-it-works {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.card-info-overlay-how-it-works-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main, #1c1c1c);
}

.card-info-overlay-one-ticket {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
  color: var(--text-main, #1c1c1c);
}

.card-info-overlay-steps {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 0 1rem;
  padding-left: 0.35rem;
  color: var(--text-main, #1c1c1c);
  list-style-type: disc;
}

.card-info-overlay-steps li {
  margin-bottom: 0.2rem;
}

.card-info-overlay-steps li:last-child {
  margin-bottom: 0;
}

.card-info-overlay-instructions-after {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
  color: var(--text-main, #1c1c1c);
}

.card-info-overlay-terms-link {
  color: var(--btn-add-to-cart-bg, #e4bc1c);
  text-decoration: underline;
}

.card-info-overlay-terms-link:hover {
  color: var(--btn-add-to-cart-bg-hover, #bf9d17);
}

.card-info-overlay-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted, #6e6e6e);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.card-info-overlay-close:hover {
  color: var(--text-main, #1c1c1c);
  background: var(--input-bg-default, #f5f5f5);
}

/* ============================= */
/*   Jackpot info button/overlay  */
/* ============================= */

.jackpot-section {
  position: relative;
  overflow: visible;
}

.jackpot-header {
  position: relative;
}

.jackpot-info-btn {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  border: 1px solid var(--input-border, #ccc);
  background: var(--bg-white, #fff);
  color: var(--text-main, #1c1c1c);
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 0.9rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  text-decoration: underline;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px var(--card-shadow, rgba(0, 0, 0, 0.05));
}

.jackpot-info-btn:hover {
  background: var(--input-bg-default, #f5f5f5);
  border-color: var(--btn-add-to-cart-bg, #e4bc1c);
  box-shadow: 0 2px 6px var(--card-shadow-hover, rgba(0, 0, 0, 0.15));
}

/* Overlay covers the whole jackpot section when open; background matches card/section */
.jackpot-info-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-white, #fff);
  border-radius: 12px;
  padding: 1rem 1rem 2.5rem;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.jackpot-info-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.jackpot-info-overlay-content {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-main, #1c1c1c);
  white-space: pre-wrap;
  word-break: break-word;
}

.jackpot-info-overlay-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted, #6e6e6e);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.jackpot-info-overlay-close:hover {
  color: var(--text-main, #1c1c1c);
  background: var(--input-bg-default, #f5f5f5);
}
