/**
 * Woo Prize Frontend Product Page Styles
 * Responsive layout: 2-column on desktop, stacked on mobile
 */

/* Root wrapper - constrains to theme container width */
.wpp-giveaway-root {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--wp--style--global--content-size, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wp--style--root--padding-left, 16px);
  padding-right: var(--wp--style--root--padding-right, 16px);
}

.wpp-giveaway-root *,
.wpp-giveaway-root *::before,
.wpp-giveaway-root *::after {
  box-sizing: border-box;
}

/* Full-width mode: override container constraints */
.wpp-giveaway-root.wpp-full-width {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/*
 * Block theme fix: giveaway replaces the gallery block inside a 2-column
 * Woo layout (gallery + summary). The summary column is stripped empty.
 * Convert to single-column layout for ALL giveaway modes (inherit + full width).
 * Do NOT override max-width — let the theme keep its natural alignment
 * (WooCommerce uses alignwide = wideSize in TT5).
 */
.wp-block-columns:has(.wpp-giveaway-root) {
  display: block !important;
  gap: 0 !important;
}
.wp-block-column:has(> .wpp-giveaway-root) {
  width: 100% !important;
  flex: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.wp-block-columns:has(.wpp-giveaway-root) > .wp-block-column:not(:has(.wpp-giveaway-root)) {
  display: none !important;
}
/* Inside block columns: theme containers handle width — no double constraint */
.wp-block-column > .wpp-giveaway-root {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Full-width only: expand the columns wrapper beyond theme width */
.wp-block-columns:has(.wpp-giveaway-root.wpp-full-width) {
  max-width: none !important;
  width: 100% !important;
}

/* Breadcrumb alignment inside container */
.wpp-giveaway-root .woocommerce-breadcrumb {
  display: none !important;
  margin: 0 0 16px;
}

/* Container */
.wpp-giveaway-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 20px 0;
  max-width: 100%;
}

/* Hero Section (Left) - Gallery Layout */
.wpp-hero {
  grid-column: 1;
  grid-row: 1;
}

.wpp-content-right {
  grid-column: 2;
  grid-row: 1;
}

.wpp-hero-media {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
}

.wpp-hero-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wpp-hero-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  padding: 0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.wpp-hero-thumb:hover {
  border-color: #3b82f6;
}

.wpp-hero-thumb.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.wpp-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
  display: block;
}

.wpp-hero-main {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: clamp(240px, 38vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpp-hero-main-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* Hero layout modifiers */
.wpp-hero--thumbs-bottom .wpp-hero-media {
  grid-template-columns: 1fr;
}

.wpp-hero--thumbs-bottom .wpp-hero-main {
  order: 1;
}

.wpp-hero--thumbs-bottom .wpp-hero-thumbs {
  order: 2;
  flex-direction: row;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* Ticket Picker (User Choose) */
.wpp-ticket-picker {
  grid-column: 1 / -1;
  grid-row: 2;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-top: -8px;
}

.wpp-ticket-picker__header {
  margin-bottom: 10px;
  font-size: 16px;
}

.wpp-ticket-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wpp-ticket-tab {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.wpp-ticket-tab.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.wpp-ticket-tab.is-hidden {
  display: none;
}

.wpp-ticket-tabs__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #1d4ed8;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}

.wpp-ticket-grid {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.wpp-ticket-grid__loading {
  padding: 16px;
  text-align: center;
  color: #64748b;
}

.wpp-ticket-grid__more {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #1d4ed8;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.wpp-ticket-grid__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .wpp-ticket-grid__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .wpp-giveaway-product {
    grid-template-columns: 1fr;
  }
  .wpp-hero,
  .wpp-content-right,
  .wpp-ticket-picker {
    grid-column: 1;
  }
  .wpp-hero { grid-row: 1; }
  .wpp-content-right { grid-row: 2; }
  .wpp-ticket-picker { grid-row: 3; }
}

.wpp-ticket-cell {
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 6px;
  text-align: center;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  cursor: pointer;
}

.wpp-ticket-cell:nth-child(6n) {
  border-right: 0;
}

.wpp-ticket-cell.is-sold {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.wpp-ticket-cell.is-reserved {
  background: #fef3c7;
  color: #b45309;
  cursor: not-allowed;
}

.wpp-ticket-cell.is-selected {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.wpp-ticket-picker__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.wpp-ticket-picker__error {
  margin-top: 8px;
  color: #b91c1c;
  font-size: 13px;
}

.wpp-lucky-dip-btn {
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.wpp-lucky-dip-btn.is-secondary {
  background: #ffffff;
  color: #1d4ed8;
}

.wpp-lucky-dip-modal__actions .wpp-lucky-dip-btn {
  border-color: #d1d5db;
}

.wpp-lucky-dip-modal__actions .wpp-lucky-dip-btn.is-secondary {
  border-color: #d1d5db;
  color: #111827;
}

.wpp-lucky-dip-modal__actions .wpp-lucky-dip-btn.is-primary {
  border-color: transparent;
}

.wpp-ticket-picker__cta .single_add_to_cart_button {
  cursor: pointer;
}

.wpp-lucky-dip-modal[hidden] {
  display: none;
}

.wpp-lucky-dip-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 9998;
}

.wpp-lucky-dip-modal__card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 10px;
  padding: 16px;
  width: min(90vw, 420px);
  z-index: 9999;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}

.wpp-lucky-dip-modal__title {
  font-weight: 700;
  margin-bottom: 10px;
}

.wpp-lucky-dip-modal__tickets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.wpp-lucky-dip-modal__ticket {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 600;
}

.wpp-lucky-dip-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.wpp-hero--fit-contain .wpp-hero-main,
.wpp-hero--fit-cover .wpp-hero-main {
  aspect-ratio: 4 / 3;
}

.wpp-hero--fit-contain .wpp-hero-main-img,
.wpp-hero--fit-cover .wpp-hero-main-img {
  width: 100%;
  height: 100%;
}

.wpp-hero--fit-contain .wpp-hero-main-img {
  object-fit: contain;
}

.wpp-hero--fit-cover .wpp-hero-main-img {
  object-fit: cover;
}

/* Fallback for old single hero image */
.wpp-hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: clamp(240px, 38vw, 420px);
  order: 1;
}

.wpp-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* Content Right (Right Column) */
.wpp-content-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  order: 2;
}

/* Headline */
.wpp-headline {
  margin: 0;
  padding-top: 0;
}

.wpp-headline h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: #1d2327;
  margin: 0 0 12px 0;
}

.wpp-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.wpp-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #f3f4f6;
  color: #111827;
}

.wpp-status-badge--active {
  background: #e8f5e9;
  color: #1b5e20;
}

.wpp-status-badge--paused {
  background: #fff7ed;
  color: #9a3412;
}

.wpp-status-badge--ended {
  background: #fef2f2;
  color: #991b1b;
}

.wpp-status-badge--winner {
  background: #eef2ff;
  color: #3730a3;
}

.wpp-status-badge--archived {
  background: #f3f4f6;
  color: #4b5563;
}

.wpp-status-badge--draft {
  background: #f5f3ff;
  color: #5b21b6;
}

/* Subtitle */
.wpp-subtitle {
  margin: 0;
  padding: 0;
}

.wpp-subtitle p {
  font-size: 16px;
  color: #646970;
  margin: 0;
  line-height: 1.5;
}

/* Buy Card */
.wpp-buy-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wpp-buy-card__header {
  font-size: 13px;
  color: #646970;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wpp-buy-card__header strong {
  color: #1d2327;
  font-weight: 600;
}

.wpp-buy-card__body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.wpp-buy-card__image {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.wpp-buy-card__text {
  flex: 1;
  font-size: 14px;
  color: #646970;
  line-height: 1.5;
}

/* Progress Bar Section */
.wpp-progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
}

.wpp-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wpp-progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.wpp-progress-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #646970;
}

.wpp-progress-label {
  font-weight: 500;
  color: #1d2327;
}

.wpp-progress-text strong {
  color: #1d2327;
}

.wpp-progress-divider {
  color: #ddd;
}

.wpp-progress-percent {
  margin-left: 8px;
  font-weight: 600;
  color: #0073aa;
}

/* Add to Cart Section */
.wpp-add-to-cart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wpp-add-to-cart form.cart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wpp-price-quantity-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d2327;
  line-height: 1.3;
}

.wpp-price-quantity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wpp-quantity-discount-note {
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  line-height: 1.3;
  text-align: right;
}

.wpp-quantity-discount-note.is-hidden {
  display: none;
}

.wpp-price-qty-tabs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 10px;
  align-items: stretch;
}

.wpp-price-qty-tabs-row--no-price {
  grid-template-columns: 1fr;
}

.wpp-price-qty-tabs-row__price .wpp-price {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpp-price-qty-tabs-row__tabs {
  min-width: 0;
}

.wpp-quantity-tabs {
  display: grid;
  grid-template-columns: repeat(var(--wpp-tab-count, 1), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.wpp-quantity-tab {
  border: 1px solid #d0d7de;
  background: #fff;
  color: #1d2327;
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.wpp-quantity-tab:hover {
  border-color: #0073aa;
  color: #005f8d;
}

.wpp-quantity-tab.is-active {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
}

.wpp-quantity-tab.is-disabled {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  height: auto;
  min-height: 36px;
  padding: 8px 10px;
  line-height: 1.35;
}

.wpp-add-to-cart .quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wpp-add-to-cart .quantity input.qty {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.wpp-add-to-cart button.button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
}

.wpp-add-to-cart-section.wpp-cta--full form.cart button.button {
  width: 100%;
}

.wpp-add-to-cart-section.wpp-cta--size-sm button.button {
  padding: 8px 16px;
  font-size: 14px;
}

.wpp-add-to-cart-section.wpp-cta--size-md button.button {
  padding: 12px 24px;
  font-size: 16px;
}

.wpp-add-to-cart-section.wpp-cta--size-lg button.button {
  padding: 16px 28px;
  font-size: 18px;
}

@media (max-width: 782px) {
  .wpp-price-quantity-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .wpp-quantity-discount-note {
    text-align: left;
  }

  .wpp-price-qty-tabs-row {
    grid-template-columns: 1fr;
  }
}

/* Product Details Section */
.wpp-product-details {
  margin-top: 40px;
  padding: 24px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  grid-column: 1 / -1;
  order: 3;
}

.wpp-product-details h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1d2327;
  margin: 0 0 16px 0;
}

.wpp-product-description {
  font-size: 14px;
  color: #646970;
  line-height: 1.6;
}

.wpp-product-description p {
  margin-bottom: 12px;
}

.wpp-product-description p:last-child {
  margin-bottom: 0;
}

/* Supervision Note */
.wpp-supervision-note {
  margin-top: 32px;
  padding: 16px;
  background: #eaf4ff;
  border: 1px solid #b7dcff;
  border-radius: 8px;
  grid-column: 1 / -1;
  order: 4;
}

.wpp-supervision-label {
  font-weight: 600;
  color: #1e3a8a;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

.wpp-supervision-note p {
  color: #646970;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Mobile Responsive: Stack columns */
@media (max-width: 782px) {
  .wpp-giveaway-root {
    padding: 0 20px;
  }

  .wpp-giveaway-product {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wpp-hero {
    order: 1;
  }

  .wpp-hero-media {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wpp-hero-thumbs {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .wpp-hero-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .wpp-hero-main {
    min-height: clamp(220px, 62vw, 320px);
  }

  .wpp-hero-section {
    order: 1;
    min-height: clamp(220px, 62vw, 320px);
  }

  .wpp-content-right {
    order: 2;
  }

  .wpp-product-details {
    order: 3;
  }

  .wpp-supervision-note {
    order: 4;
  }

  .wpp-headline h1 {
    font-size: 24px;
  }

  .wpp-buy-card__body {
    flex-direction: row;
  }

  .wpp-buy-card__image {
    width: 50px;
    height: 50px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .wpp-giveaway-root {
    padding: 0 12px;
  }

  .wpp-giveaway-product {
    gap: 16px;
    padding: 12px 0;
  }

  .wpp-headline h1 {
    font-size: 20px;
  }

  .wpp-hero-section {
    min-height: clamp(200px, 66vw, 280px);
  }

  .wpp-buy-card {
    padding: 12px;
  }

  .wpp-progress-section {
    padding: 12px;
  }

  .wpp-product-details {
    padding: 16px;
    margin-top: 24px;
  }

  .wpp-product-details h2 {
    font-size: 18px;
  }

  .wpp-supervision-note {
    margin-top: 24px;
    padding: 12px;
  }
}

/* Countdown Styles */
.wpp-countdown-section {
  margin-bottom: 24px;
}

.wpp-countdown-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: block;
}

.wpp-countdown {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.wpp-countdown-unit {
  text-align: center;
  min-width: 60px;
}

.wpp-countdown-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  margin-bottom: 4px;
}

.wpp-countdown-unit .wpp-countdown-unit-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.wpp-countdown-ended {
  text-align: center;
  padding: 16px;
  background: #eaf4ff;
  border: 1px solid #b7dcff;
  border-radius: 6px;
  color: #1e3a8a;
  font-weight: 600;
}

/* Mobile countdown */
@media (max-width: 782px) {
  .wpp-countdown {
    gap: 12px;
  }
  
  .wpp-countdown-unit {
    min-width: 50px;
  }
  
  .wpp-countdown-value {
    font-size: 20px;
  }
  
  .wpp-countdown-unit .wpp-countdown-unit-label {
    font-size: 10px;
  }
}

/* Tab Styles */
.wpp-tabs-nav {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.wpp-tab-button {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.wpp-tab-button:hover {
  color: #374151;
}

.wpp-tab-button.is-active {
  color: #0073aa;
  border-bottom-color: #0073aa;
}

.wpp-tabs-content {
  position: relative;
}

.wpp-tab-panel {
  display: none;
}

.wpp-tab-panel.is-active {
  display: block;
}

.wpp-tab-panel h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1d2327;
  margin: 0 0 16px 0;
}

/* Recent Entries Styles */
.wpp-recent-entries {
  max-height: 400px;
  overflow-y: auto;
}

.wpp-entries-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wpp-entry-item {
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.wpp-entry-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.wpp-entry-name {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.wpp-entry-time {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.wpp-no-entries {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

/* Mobile tabs */
@media (max-width: 782px) {
  .wpp-tabs-nav {
    flex-wrap: wrap;
  }
  
  .wpp-tab-button {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .wpp-entry-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .wpp-entry-time {
    align-self: flex-end;
  }
}

/* Winner Section Styles */
.wpp-winner-section {
  background: #eaf4ff;
  border: 1px solid #b7dcff;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  grid-column: 1 / -1;
  order: 0;
}

.wpp-winner-section h3 {
  color: #1e3a8a;
  margin: 0 0 15px 0;
  font-size: 1.2em;
}

.wpp-winner-section .winner-congratulations {
  background: #2271b1;
  color: white;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  text-align: center;
}

.wpp-winner-section .winner-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.wpp-winner-section .winner-info-label {
  color: #1e3a8a;
  font-weight: 600;
}

.wpp-winner-section .winner-info-value {
  font-size: 1.1em;
}

.wpp-winner-section .winner-ticket {
  font-weight: bold;
  color: #2271b1;
}

.wpp-winner-section .winner-footer {
  margin-top: 15px;
  color: #64748b;
  font-size: 0.9em;
}

/* Mobile winner section */
@media (max-width: 782px) {
  .wpp-winner-section {
    order: 0;
    margin: 16px 0;
    padding: 16px;
  }
  
  .wpp-winner-section .winner-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Ticket number styling in recent entries */
.wpp-entry-ticket {
  color: #2271b1;
  font-weight: 500;
  font-size: 0.9em;
  margin: 4px 0;
}

.wpp-entry-ticket strong {
  color: #1e3a8a;
}

/* Pagination hover effects */
.wpp-entries-pagination a:hover {
  background: #e9ecef !important;
  border-color: #adb5bd !important;
}

/* Loading state for pagination */
.wpp-entries-list.loading,
.wpp-no-entries.loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ===================== Winner Section ===================== */

.wpp-winner-section {
  background: #eaf4ff;
  border: 1px solid #b7dcff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
  color: #1e293b;
  font-size: 15px;
}

.wpp-winner-section__title {
  color: #1e3a8a;
  font-size: 18px;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.wpp-winner-section__congrats {
  background: #2271b1;
  color: #ffffff;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
}

.wpp-winner-section__list {
  display: grid;
  gap: 10px;
}

.wpp-winner-section__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}

.wpp-winner-section__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wpp-winner-section__label {
  color: #1e3a8a;
  font-weight: 600;
  font-size: 0.85em;
}

.wpp-winner-section__value {
  font-size: 1.05em;
}

.wpp-winner-section__ticket {
  color: #2271b1;
  font-weight: 700;
  font-size: 1.05em;
}

.wpp-winner-section__footer {
  margin-top: 12px;
  margin-bottom: 0;
  color: #64748b;
  font-size: 0.9em;
}

@media (max-width: 600px) {
  .wpp-winner-section__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ===================== Winners Page ===================== */

.wpp-winners-page {
  width: 100%;
}

.wpp-winners-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.wpp-winner-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wpp-winner-image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2px;
}

.wpp-winner-giveaway {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.wpp-winner-congrats {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

.wpp-winner-user-row {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.wpp-winner-user,
.wpp-winner-ticket,
.wpp-winner-date {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.45;
}

.wpp-winner-ticket {
  font-weight: 600;
  color: #1e293b;
}

.wpp-winner-on-winning {
  color: #0f172a;
}

.wpp-winners-pagination {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

@media (max-width: 1024px) {
  .wpp-winners-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wpp-winners-list {
    grid-template-columns: 1fr;
  }
}

/* ===================== Category Page ===================== */

.wpp-category-live-giveaway {
  width: 100%;
}

.wpp-category-live-title,
.wpp-category-live-subtitle {
  margin: 0;
}

.wpp-category-live-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.wpp-category-live-item {
  display: grid;
  gap: 10px;
}

.wpp-category-live-item-link {
  display: grid;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.wpp-category-live-item--linked {
  cursor: pointer;
}

.wpp-category-live-win-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.wpp-category-live-win,
.wpp-category-live-giveaway-name,
.wpp-category-live-when-buy,
.wpp-category-live-product-name,
.wpp-category-live-price,
.wpp-category-live-draw-date {
  margin: 0;
  line-height: 1.35;
}

.wpp-category-live-product-name {
  display: block;
}

.wpp-category-live-photo {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.wpp-category-live-link {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .wpp-category-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wpp-category-live-grid {
    grid-template-columns: 1fr;
  }
}
