/* ========== Christmas Prize Calendar (shared) ==========
   Advent-door calendar styling, shared by the public prize page (prize.php)
   and the account Prize Draws tab (account/my_raffles_tab.php) so both look
   identical. */

.prize-calendar-section {
  background: linear-gradient(160deg, #14391f 0%, #1d4d2b 55%, #163a21 100%);
  border-radius: 14px;
  padding: 26px 24px 20px;
}
.prize-calendar-title {
  font-size: 1.4em;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.prize-calendar-intro {
  color: #d8e8d8;
  font-size: 0.92em;
  margin: 0 0 20px;
  max-width: 720px;
}
.prize-calendar-intro strong { color: #ffd76a; }
.prize-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.calendar-door {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s;
}
.calendar-door:hover { transform: translateY(-4px); }
.calendar-door-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #b3262c;
  color: #fff;
  padding: 6px 10px;
}
.calendar-door-day {
  font-size: 0.72em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.calendar-door-date { font-size: 0.74em; font-weight: 600; }
.calendar-door-image {
  background: #f6f6f6;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.calendar-door-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.calendar-door-gift { font-size: 2.4em; }
.calendar-door-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.calendar-door-prize {
  font-size: 0.8em;
  font-weight: 700;
  color: #222;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.calendar-door-winner {
  margin-top: auto;
  font-size: 0.76em;
  font-weight: 700;
  color: #8a6d00;
  background: #fff7dc;
  border-radius: 5px;
  padding: 4px 8px;
}
.calendar-door-status {
  margin-top: auto;
  font-size: 0.74em;
  font-weight: 600;
  color: #777;
}
.calendar-door-status--today {
  color: #b3262c;
  animation: doorPulse 1.4s ease-in-out infinite;
}
@keyframes doorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.calendar-door--past { opacity: 0.82; }
.calendar-door--today {
  outline: 3px solid #ffd76a;
  outline-offset: 2px;
}
.calendar-door--grand {
  grid-column: 1 / -1;          /* own row in the grid layout (prize page) */
  justify-self: center;
  width: min(340px, 100%);
  outline: 3px solid #ffd76a;
  outline-offset: 2px;
}
.calendar-door--grand .calendar-door-head {
  background: linear-gradient(90deg, #9a6a00, #d4a017);
}
.calendar-door--grand .calendar-door-image { height: 150px; }
.calendar-door--mystery .calendar-door-image {
  background: repeating-linear-gradient(
    45deg,
    #b3262c,
    #b3262c 14px,
    #a01f25 14px,
    #a01f25 28px
  );
}
.calendar-door--mystery .calendar-door-gift {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.calendar-door--grand.calendar-door--mystery .calendar-door-image {
  background: repeating-linear-gradient(
    45deg,
    #c9a227,
    #c9a227 14px,
    #b8921f 14px,
    #b8921f 28px
  );
}
.calendar-door-prize--mystery {
  color: #888;
  font-style: italic;
}
.calendar-door-rrp {
  align-self: flex-start;
  font-size: 0.7em;
  font-weight: 800;
  color: #8a6d00;
  background: #fff7dc;
  border: 1px solid #ecd98a;
  border-radius: 5px;
  padding: 2px 7px;
}
.calendar-door-ribbon {
  position: absolute;
  top: 34px;
  right: -34px;
  transform: rotate(38deg);
  background: #ffd76a;
  color: #5b4300;
  font-size: 0.68em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 38px;
  z-index: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.prize-calendar-footnote {
  color: #bcd6bc;
  font-size: 0.8em;
  margin: 18px 0 0;
  text-align: center;
}
.prize-calendar-teaser {
  background: linear-gradient(160deg, #14391f 0%, #1d4d2b 55%, #163a21 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
}
.calendar-teaser-icon { font-size: 2.4em; flex-shrink: 0; }
.calendar-teaser-title {
  font-size: 1.2em;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}
.calendar-teaser-text p {
  color: #d8e8d8;
  font-size: 0.92em;
  margin: 0;
}

/* Account tab caption that changes as you hover a door */
.xmas-cal-caption {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.95em;
  font-style: italic;
  font-weight: 700;
  color: #ffd76a;
  min-height: 1.3em;
}

/* Home-page calendar wrapper (inside the Prize Draw Items section) */
.xmas-home-cal {
  max-width: 1150px;
  margin: 10px auto 30px;
  position: relative;
  z-index: 1;
  text-align: left;
}
/* Centre the title + intro text */
.xmas-home-cal .prize-calendar-header { text-align: center; }
.xmas-home-cal .prize-calendar-intro { margin-left: auto; margin-right: auto; }
/* Second tree at the end of the title */
.xmas-home-cal .prize-calendar-title::after { content: " \1F384"; }

/* Centre the doors as a block (flex wrap centres every row, including the last) */
.xmas-home-cal .prize-calendar-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.xmas-home-cal .calendar-door { width: 170px; }
.xmas-home-cal .calendar-door--grand { width: min(538px, 100%); } /* ~3 doors + gaps */

/* Desktop: exactly 6 doors per row so the 12 day-doors fill 2 rows and the
   grand prize takes row 3 — 3 rows total, whatever the container width.
   (70px = the 5 × 14px gaps between 6 doors.) */
@media (min-width: 992px) {
  .xmas-home-cal .calendar-door { width: calc((100% - 70px) / 6); }
  /* Grand prize ≈ 3 door-columns wide (3 doors + 2 gaps) */
  .xmas-home-cal .calendar-door--grand { width: calc(50% - 7px); }
}

/* Decorative "Get Ready!" lead door (home only) */
.calendar-door--intro .calendar-door-head {
  background: linear-gradient(90deg, #2e3d16, #556B2F);
}
.calendar-door--intro .calendar-door-image {
  background: #eef4e0;
}
.calendar-door--intro .calendar-door-gift { filter: none; }
.calendar-door--intro .calendar-door-prize { color: #2e3d16; }
.calendar-door--intro .calendar-door-status {
  color: #556B2F;
  font-style: italic;
}

/* Row break so the grand prize (Christmas Day) always gets its own line.
   Hidden everywhere except the home flex layout. */
.calendar-row-break { display: none; }
.xmas-home-cal .calendar-row-break {
  display: block;
  flex-basis: 100%;
  width: 100%;
  height: 0;
}

@media (max-width: 540px) {
  .xmas-home-cal .calendar-door { width: 44%; }
  .xmas-home-cal .calendar-door--grand { width: 92%; }
}

/* Admin date-preview note (home page + account tab) */
.xmas-preview-note {
  max-width: 1100px;
  margin: 0 auto 12px;
  background: #fff7e6;
  border: 1px solid #e6c37a;
  color: #8a5a00;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}
.xmas-preview-note code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
}

@media (max-width: 540px) {
  .prize-calendar-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-door--grand { grid-column: span 2; }
}
