/*--------------------------------------------------------------
  LINAJE — Ruleta Expo Café
  Usa los tokens del tema (style.css): --heading-color, --copper-color,
  --cream-color, --white-color, --gray-color y sus fuentes.
----------------------------------------------------------------*/
.rl_body {
  min-height: 100vh;
  background: var(--heading-color);
  color: var(--white-color);
  overflow-x: hidden;
}

.rl_stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.rl_stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 50%, rgba(176, 112, 60, 0.28), transparent 55%),
    linear-gradient(rgba(38, 51, 37, 0.88), rgba(38, 51, 37, 0.94)),
    url("../img/cta_bg_2.jpg") center / cover no-repeat;
}

/* Barra superior */
.rl_top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.rl_brand img {
  height: 46px;
  width: auto;
}

.rl_top_actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rl_icon_btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-color);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.rl_icon_btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

.rl_link_shop {
  color: var(--white-color);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  margin-right: 8px;
  opacity: 0.8;
}

.rl_link_shop:hover {
  color: var(--copper-color);
  opacity: 1;
}

/* Contenido */
.rl_main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 48px;
  padding: 10px 0 50px;
}

.rl_eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper-color);
  margin-bottom: 18px;
}

.rl_eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--copper-color);
}

.rl_title {
  font-size: 84px;
  line-height: 0.98;
  color: var(--white-color);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.rl_title span {
  color: var(--copper-color);
}

.rl_lead {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
  margin-bottom: 30px;
}

.rl_rules {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.rl_rule {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rl_rule i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--copper-color);
  color: #fff;
  font-size: 17px;
}

.rl_rule strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 22px;
  line-height: 1.1;
  color: var(--white-color);
}

.rl_rule span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.rl_prizes_title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}

.rl_prizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rl_prizes li {
  padding: 7px 14px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  color: var(--white-color);
}

.rl_prizes li.is_out {
  opacity: 0.4;
  text-decoration: line-through;
}

/* Ruleta */
.rl_wheel_col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.rl_wheel_wrap {
  position: relative;
  width: min(560px, 86vw, 68vh);
  aspect-ratio: 1;
}

.rl_wheel_ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #2b3a2a 60%, #222e21 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 0 3px rgba(176, 112, 60, 0.9),
    inset 0 0 0 10px #263325;
}

.rl_bulbs {
  position: absolute;
  inset: 0;
}

.rl_bulb {
  position: absolute;
  width: 3.2%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream-color);
  box-shadow: 0 0 8px rgba(244, 239, 228, 0.7);
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.rl_bulb:nth-child(even) {
  background: var(--copper-color);
  box-shadow: 0 0 8px rgba(176, 112, 60, 0.8);
}

.is_spinning .rl_bulb {
  animation: rl_blink 0.5s steps(1) infinite;
}

.is_spinning .rl_bulb:nth-child(even) {
  animation-delay: 0.25s;
}

@keyframes rl_blink {
  50% {
    background: #fff;
    box-shadow: 0 0 14px #fff;
  }
}

.rl_wheel {
  position: absolute;
  inset: 6.5%;
  border-radius: 50%;
  transform: rotate(0deg);
  transition: transform 6.5s cubic-bezier(0.12, 0.62, 0.08, 1);
  will-change: transform;
}

.rl_wheel svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rl_seg_label {
  font-family: var(--heading-font);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rl_hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--cream-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 6px var(--heading-color), 0 0 0 9px var(--copper-color);
  display: grid;
  place-items: center;
  z-index: 3;
}

.rl_hub img {
  width: 76%;
  height: auto;
}

.rl_pointer {
  position: absolute;
  top: -1.5%;
  left: 50%;
  width: 9%;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
  transform-origin: 50% 20%;
}

.rl_pointer.is_tick {
  animation: rl_tick 0.12s ease-out;
}

@keyframes rl_tick {
  40% {
    transform: translateX(-50%) rotate(-12deg);
  }
}

/* Estado y botón */
.rl_status {
  text-align: center;
  min-height: 52px;
}

.rl_status_name {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--white-color);
}

.rl_status_text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.rl_spins {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.rl_spins i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--copper-color);
}

.rl_spin_btn {
  min-width: 260px;
  padding: 20px 46px;
  border: none;
  border-radius: 60px;
  background: var(--copper-color);
  color: #fff;
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 0 14px 40px rgba(176, 112, 60, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.rl_spin_btn:hover:not(:disabled) {
  transform: translateY(-3px);
  background: #c07d47;
}

.rl_spin_btn:not(:disabled) {
  animation: rl_pulse 2.2s ease-in-out infinite;
}

.rl_spin_btn:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
  cursor: not-allowed;
  font-size: 15px;
  letter-spacing: 1px;
}

@keyframes rl_pulse {
  50% {
    box-shadow: 0 14px 40px rgba(176, 112, 60, 0.45), 0 0 0 12px rgba(176, 112, 60, 0.15);
  }
}

.rl_foot {
  padding: 18px 0 26px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Modales (resultado y PIN) */
.rl_modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 28, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.rl_modal.is_open {
  opacity: 1;
  pointer-events: auto;
}

.rl_modal_card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 40px 34px 34px;
  border-radius: 28px;
  background: var(--white-color);
  color: var(--heading-color);
  text-align: center;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.rl_modal.is_open .rl_modal_card {
  transform: none;
}

.rl_modal_close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--gray-color);
  color: var(--heading-color);
  cursor: pointer;
}

.rl_win_icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--heading-color);
  color: var(--copper-color);
  font-size: 38px;
  box-shadow: 0 0 0 8px var(--cream-color), 0 0 0 10px var(--copper-color);
}

.rl_win_kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper-color);
  margin-bottom: 8px;
}

.rl_win_title {
  font-size: 40px;
  line-height: 1.05;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.rl_win_text {
  font-size: 16px;
  color: rgba(55, 72, 54, 0.75);
  margin-bottom: 22px;
}

.rl_code {
  display: inline-block;
  padding: 12px 22px;
  margin-bottom: 8px;
  border: 2px dashed var(--copper-color);
  border-radius: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--heading-color);
  background: var(--cream-color);
}

.rl_code_note {
  font-size: 13px;
  color: rgba(55, 72, 54, 0.6);
  margin-bottom: 24px;
}

.rl_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: none;
  border-radius: 40px;
  background: var(--heading-color);
  color: var(--white-color);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.rl_btn:hover {
  background: var(--copper-color);
}

.rl_btn_ghost {
  background: transparent;
  color: var(--heading-color);
  border: 1px solid rgba(55, 72, 54, 0.3);
}

.rl_btn_ghost:hover {
  background: var(--gray-color);
  color: var(--heading-color);
}

.rl_btn_block {
  width: 100%;
}

/* PIN */
.rl_pin_input {
  width: 100%;
  max-width: 240px;
  margin: 8px auto 6px;
  display: block;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(55, 72, 54, 0.25);
  background: #fff;
  text-align: center;
  font-size: 26px;
  letter-spacing: 10px;
  color: var(--heading-color);
}

.rl_error {
  min-height: 22px;
  font-size: 14px;
  color: #b3261e;
  margin-bottom: 12px;
}

/* Panel del personal */
.rl_panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  width: min(560px, 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white-color);
  color: var(--heading-color);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rl_panel.is_open {
  transform: none;
}

.rl_panel_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(55, 72, 54, 0.1);
}

.rl_panel_head h2 {
  font-size: 22px;
  margin: 0;
}

.rl_panel_head .rl_modal_close {
  position: static;
}

.rl_tabs {
  display: flex;
  gap: 6px;
  padding: 14px 26px 0;
}

.rl_tab {
  padding: 10px 16px;
  border: none;
  border-radius: 30px;
  background: transparent;
  color: var(--heading-color);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.rl_tab.is_active {
  background: var(--heading-color);
  color: var(--white-color);
}

.rl_panel_body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 30px;
}

.rl_pane[hidden] {
  display: none;
}

.rl_field {
  margin-bottom: 16px;
  text-align: left;
}

.rl_field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.rl_field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(55, 72, 54, 0.2);
  background: #fff;
  color: var(--heading-color);
  font-size: 16px;
}

.rl_field input:focus,
.rl_pin_input:focus {
  outline: 2px solid var(--copper-color);
  outline-offset: 1px;
}

.rl_types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rl_type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rl_type span {
  display: block;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(55, 72, 54, 0.2);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rl_type span i {
  display: block;
  font-size: 22px;
  color: var(--copper-color);
  margin-bottom: 8px;
}

.rl_type span b {
  display: block;
  font-size: 16px;
}

.rl_type span small {
  font-size: 13px;
  opacity: 0.7;
}

.rl_type input:checked + span {
  border-color: var(--heading-color);
  background: var(--heading-color);
  color: var(--white-color);
}

.rl_type input:focus-visible + span {
  outline: 2px solid var(--copper-color);
}

.rl_hint {
  font-size: 13px;
  color: rgba(55, 72, 54, 0.6);
  margin-top: 10px;
}

.rl_ok {
  padding: 12px 16px;
  border-radius: 12px;
  background: #e6f0e4;
  color: #2c5b2a;
  font-size: 14px;
  margin-bottom: 16px;
}

.rl_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rl_table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  padding: 0 8px 10px;
}

.rl_table td {
  padding: 10px 8px;
  border-top: 1px solid rgba(55, 72, 54, 0.1);
  vertical-align: middle;
}

.rl_table input {
  width: 74px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(55, 72, 54, 0.2);
  text-align: center;
}

.rl_stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.rl_stat {
  padding: 14px;
  border-radius: 14px;
  background: var(--cream-color);
  text-align: center;
}

.rl_stat b {
  display: block;
  font-family: var(--heading-font);
  font-size: 26px;
}

.rl_stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.rl_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.rl_actions .rl_btn {
  padding: 11px 20px;
  font-size: 14px;
}

.rl_empty {
  padding: 30px 0;
  text-align: center;
  opacity: 0.6;
}

.rl_confetti {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 1199px) {
  .rl_title {
    font-size: 64px;
  }
}

@media (max-width: 991px) {
  .rl_main {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
  }

  .rl_wheel_col {
    order: -1;
  }

  .rl_lead {
    margin-left: auto;
    margin-right: auto;
  }

  .rl_rules,
  .rl_prizes {
    justify-content: center;
  }

  .rl_eyebrow::before {
    display: none;
  }

  .rl_rule {
    text-align: left;
  }
}

@media (max-width: 575px) {
  .rl_title {
    font-size: 44px;
  }

  .rl_lead {
    font-size: 16px;
  }

  .rl_link_shop {
    display: none;
  }

  .rl_brand img {
    height: 38px;
  }

  .rl_spin_btn {
    min-width: 0;
    width: 100%;
    padding: 18px 24px;
  }

  .rl_win_title {
    font-size: 32px;
  }

  .rl_modal_card {
    padding: 36px 22px 26px;
  }

  .rl_stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rl_wheel {
    transition-duration: 2s;
  }

  .rl_spin_btn:not(:disabled),
  .is_spinning .rl_bulb {
    animation: none;
  }
}

/* Acciones bajo el botón (ir a la tienda, iniciar sesión, elegir pedido) */
.rl_status_actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.rl_status_actions:empty {
  display: none;
}

.rl_chip_btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.rl_chip_btn:hover,
.rl_chip_btn.is_active {
  background: var(--white-color);
  border-color: var(--white-color);
  color: var(--heading-color);
}

.rl_chip_btn b {
  color: var(--copper-color);
}

.rl_entregado {
  color: #2c5b2a;
  font-size: 12px;
  font-weight: 700;
}

/* Visible solo dentro del checkout (?embed=1) */
.rl_show_embed {
  display: none;
}

.is_embed .rl_show_embed {
  display: grid;
}

.is_embed .rl_hide_embed {
  display: none;
}

.is_embed .rl_stage::before {
  background:
    radial-gradient(circle at 72% 50%, rgba(176, 112, 60, 0.28), transparent 55%),
    linear-gradient(rgba(38, 51, 37, 0.94), rgba(38, 51, 37, 0.97)),
    url("../img/cta_bg_2.jpg") center / cover no-repeat;
}

.is_embed .rl_title {
  font-size: 64px;
}

@media (max-width: 991px) {
  .is_embed .rl_intro .rl_lead,
  .is_embed .rl_intro .rl_prizes_title,
  .is_embed .rl_intro .rl_prizes {
    display: none;
  }

  .is_embed .rl_title {
    font-size: 40px;
  }
}

/* Dos ruletas: las tarjetas de reglas sirven para cambiar de ruleta */
.rl_rule.is_link { cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.rl_rule.is_link:hover { background: rgba(255, 255, 255, 0.1); }
.rl_rule.is_active { background: rgba(176, 112, 60, 0.18); border-color: var(--copper-color); }
.rl_rule.is_link strong { font-size: 18px; }
