/* Dot by Dot Raffle — editorial/minimal front-end treatment. */
.dbd-raffle {
  --dbd-line: rgba(255,255,255,.88);
  --dbd-line-soft: rgba(255,255,255,.22);
  --dbd-white: #fff;
  --dbd-black: #000;
  /* Highlight colour for a number the visitor has selected. Change these two to restyle it. */
  --dbd-selected-bg: #fff;
  --dbd-selected-fg: #000;
  /* Background of numbers that are reserved or sold. Black reads as "gone" on a dark page. */
  --dbd-taken-bg: #000;
  font-family: 'Work Sans', sans-serif !important;
  color: inherit;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.dbd-raffle,
.dbd-raffle * { box-sizing: border-box; }

.dbd-raffle [hidden] { display: none !important; }

.dbd-raffle__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 40px;
  align-items: start;
  margin: 0 0 30px;
}

.dbd-raffle__intro {
  margin: 0;
}
.dbd-raffle__intro > :last-child { margin-bottom: 0; }

/* Prize boxes (1st / 2nd / 3rd). Set the image shape with --dbd-prize-ratio, e.g. 4 / 5 for portrait. */
.dbd-raffle__prizes {
  --dbd-prize-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dbd-prize { margin: 0; padding: 0; }

.dbd-prize__frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--dbd-prize-ratio);
  border: 1px solid var(--dbd-line);
  overflow: hidden;
  background: transparent;
}

.dbd-prize__frame img,
.dbd-prize__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
}

.dbd-prize__label {
  margin: 8px 0 0;
  font-family: inherit !important;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: inherit !important;
  opacity: .85;
}

.dbd-raffle__eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
  line-height: 1.3;
  font-family: inherit !important;
  color: inherit !important;
  opacity: .72;
}

.dbd-raffle h1 {
  margin: 0 0 10px;
  font-family: inherit !important;
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: inherit;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: inherit !important;
}

.dbd-raffle__description {
  margin: 0;
  max-width: 520px;
  font-family: inherit !important;
  font-size: 14px;
  line-height: 1.55;
  color: inherit !important;
  opacity: .72;
}

.dbd-raffle__meta,
.dbd-raffle__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--dbd-line);
  border-bottom: 1px solid var(--dbd-line);
  padding: 12px 0;
  font-family: inherit !important;
  font-size: 12px;
  line-height: 1.4;
  color: inherit !important;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.dbd-raffle__meta strong,
.dbd-raffle__summary strong { font-weight: inherit; }

.dbd-raffle__grid {
  display: grid;
  grid-template-columns: repeat(var(--dbd-cols, 25), minmax(0, 1fr));
  width: 100%;
  border: 0 !important;
  border-top: 1px solid var(--dbd-line) !important;
  border-left: 1px solid var(--dbd-line) !important;
  margin: 18px 0 26px;
  padding: 0;
  gap: 0;
  background: transparent !important;
}

/* Explicitly reset Elementor/global button styles. */
.dbd-raffle .dbd-ticket,
.dbd-raffle button.dbd-ticket {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-right: 1px solid var(--dbd-line) !important;
  border-bottom: 1px solid var(--dbd-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
  background: transparent !important;
  color: #fff !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: clamp(9px, 1.15vw, 14px);
  font-weight: inherit;
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: none;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

@media (hover: hover) {
  .dbd-raffle .dbd-ticket:hover:not(:disabled) {
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
  }
}
.dbd-raffle .dbd-ticket:focus-visible:not(:disabled) {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  outline: none;
}

/* Random-pick buttons above the board. */
.dbd-raffle__random {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}
.dbd-raffle button.dbd-random-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  margin: 0;
  padding: 12px 8px;
  border: 1px solid var(--dbd-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #fff !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 12px;
  font-weight: inherit;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}
/* Hover colours only apply on devices with a real pointer, so a tap on a phone doesn't leave the button stuck lit. */
@media (hover: hover) {
  .dbd-raffle button.dbd-random-btn:hover:not(:disabled) {
    background: var(--dbd-selected-bg) !important;
    color: var(--dbd-selected-fg) !important;
  }
}
.dbd-raffle button.dbd-random-btn:focus-visible:not(:disabled),
.dbd-raffle button.dbd-random-btn:active:not(:disabled) {
  background: var(--dbd-selected-bg) !important;
  color: var(--dbd-selected-fg) !important;
  outline: none;
}
.dbd-raffle button.dbd-random-btn:disabled { opacity: .35; cursor: not-allowed; }
.dbd-random-btn__word,
.dbd-random-btn__num { display: inline; color: inherit !important; font: inherit; letter-spacing: inherit; }

.dbd-raffle__chosen {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .85;
  word-break: break-word;
}
.dbd-raffle__chosen:empty { display: none; }

/* Ticket states.
   These use `button.dbd-ticket.dbd-ticket--state` so they out-rank the base reset above
   (which is marked !important). Before this, the state colours were being overridden. */
.dbd-raffle button.dbd-ticket.dbd-ticket--selected,
.dbd-raffle button.dbd-ticket.dbd-ticket--selected:hover,
.dbd-raffle button.dbd-ticket.dbd-ticket--selected:focus-visible {
  background: var(--dbd-selected-bg) !important;
  color: var(--dbd-selected-fg) !important;
}

/* Taken numbers (reserved by someone mid-checkout, or sold): an empty black square.
   The number is hidden and the pointer shows the "not allowed" symbol on hover. */
.dbd-raffle button.dbd-ticket.dbd-ticket--reserved,
.dbd-raffle button.dbd-ticket.dbd-ticket--reserved:hover,
.dbd-raffle button.dbd-ticket.dbd-ticket--reserved:focus-visible,
.dbd-raffle button.dbd-ticket.dbd-ticket--sold,
.dbd-raffle button.dbd-ticket.dbd-ticket--sold:hover,
.dbd-raffle button.dbd-ticket.dbd-ticket--sold:focus-visible,
.dbd-raffle button.dbd-ticket:disabled {
  background: var(--dbd-taken-bg) !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-decoration: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  user-select: none;
}

.dbd-raffle__checkout {
  width: min(100%, 520px);
  margin: 0 0 0 auto;
}

.dbd-raffle__summary {
  margin: 0;
  text-transform: none;
  letter-spacing: .03em;
  font-size: 13px;
}

.dbd-raffle__agreement {
  position: relative;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.55;
}

.dbd-raffle__agreement-label {
  opacity: .8;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.dbd-raffle__agreement-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  border: 1px solid currentColor;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

.dbd-raffle__agreement-checkbox:checked {
  background: currentColor !important;
  box-shadow: inset 0 0 0 3px transparent !important;
}

.dbd-raffle__rules-trigger {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
}

.dbd-raffle__rules-popover {
  position: absolute;
  z-index: 20;
  left: 25px;
  bottom: calc(100% + 10px);
  width: min(430px, calc(100vw - 40px));
  padding: 16px 18px;
  border: 1px solid rgba(0,0,0,.3);
  background: #f1f1f1 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
  opacity: 1 !important;
}
.dbd-raffle__rules-inner {
  max-height: 60vh;
  overflow-y: auto;
}
.dbd-raffle__rules-popover * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.dbd-raffle__rules-popover::after {
  content: "";
  position: absolute;
  left: 17px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #f1f1f1;
  border-right: 1px solid rgba(0,0,0,.3);
  border-bottom: 1px solid rgba(0,0,0,.3);
  transform: rotate(45deg);
}

.dbd-raffle__continue {
  width: 100%;
  margin-top: 16px;
  padding: 13px 18px;
  border: 1px solid currentColor !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 12px;
  font-weight: inherit;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.dbd-raffle__continue:hover:not(:disabled) {
  background: currentColor !important;
  color: #000 !important;
}

.dbd-raffle__continue:disabled {
  opacity: .28;
  cursor: not-allowed;
}

.dbd-raffle__timer,
.dbd-raffle__message {
  font-family: inherit !important;
  font-size: 12px;
  line-height: 1.5;
  margin: 11px 0 0;
  color: inherit;
}

.dbd-raffle__message { opacity: .65; }
.dbd-cart-quantity { display:inline-block; min-width: 2em; text-align:center; }

/* Reservation countdown shown on cart / checkout. */
.dbd-timer-bar {
  font-family: 'Work Sans', sans-serif !important;
  box-sizing: border-box;
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid currentColor;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.dbd-timer-bar--fixed {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  background: #fff;
  color: #111;
}
.dbd-timer-bar--expired { font-weight: 600; }
.dbd-timer-bar a { color: inherit; text-decoration: underline; margin-left: 8px; }

@media (max-width: 900px) {
  .dbd-raffle__top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dbd-raffle { --dbd-cols: 20 !important; }
  .dbd-raffle .dbd-ticket { font-size: clamp(10px, 1.7vw, 14px); }
}

@media (max-width: 700px) {
  .dbd-raffle { --dbd-cols: 10 !important; }
  /* Four random buttons stay in one row on phones: smaller text, "Random" stacked above the number. */
  .dbd-raffle__random { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .dbd-raffle button.dbd-random-btn {
    padding: 9px 2px;
    font-size: clamp(9px, 2.6vw, 11px);
    letter-spacing: .04em;
    line-height: 1.3;
    text-align: center;
  }
  .dbd-random-btn__word,
  .dbd-random-btn__num { display: block; }
  .dbd-random-btn__num { font-size: 1.25em; margin-top: 2px; }
  .dbd-raffle__prizes { gap: 8px; }
  .dbd-prize__label { font-size: 9px; letter-spacing: .06em; }
  .dbd-raffle__rules-popover { left: 0; width: 100%; }
  .dbd-raffle__rules-popover::after { left: 24px; }
  .dbd-raffle { width: 100%; }
  .dbd-raffle__grid { margin-top: 18px; margin-bottom: 22px; }
  .dbd-raffle .dbd-ticket { font-size: clamp(12px, 3.4vw, 16px); }
  .dbd-raffle__meta,
  .dbd-raffle__summary { font-size: 10px; }
  .dbd-raffle__checkout { width: 100%; }
}
