/* =====================================================
   MODERN ENHANCEMENTS - RifAmericana
   Diseño moderno y profesional con microanimaciones
   ===================================================== */

/* Import Outfit font for premium feel */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ---- ROOT VARIABLES ---- */
:root {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --card-radius: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.18s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shimmer-color: rgba(255, 255, 255, 0.18);
}

/* Logo specific styles */
#navbar img[alt="Logo"],
#finalContent img[alt="Logo"] {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
  transition: var(--transition-smooth);
}

#navbar img[alt="Logo"]:hover {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.3));
  transform: scale(1.02);
}

/* Responsive adjustment for small screens */
@media (max-width: 640px) {
  #navbar .px-5 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ---- PREMIUM SKELETON SCREENS ---- */
.skeleton {
  background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.1) 37%,
      rgba(255, 255, 255, 0.05) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 12px;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Specific Skeleton Shapes */
.skeleton-card { height: 350px; width: 100%; }
.skeleton-title { height: 40px; width: 70%; margin-bottom: 20px; }
.skeleton-text { height: 15px; width: 100%; margin-bottom: 10px; }
.skeleton-btn { height: 50px; width: 100%; border-radius: 50px; }

/* ---- SUCCESS ANIMATION & PDF RECEIPT STYLES ---- */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  position: relative;
  padding: 10px;
}

.check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid #4CAF50;
}

.check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
  animation: rotate-circle 4.25s ease-in;
}

.check-icon::before, .check-icon::after {
  content: '';
  height: 100px;
  position: absolute;
  background: transparent;
  transform: rotate(-45deg);
}

.icon-line {
  height: 5px;
  background-color: #4CAF50;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.icon-line.line-tip {
  top: 46px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.75s;
}

.check-icon .icon-circle {
  top: -4px;
  left: -4px;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(76, 175, 80, 0.5);
  box-sizing: content-box;
  position: absolute;
}

@keyframes icon-line-tip {
  0% { width: 0; left: 1px; top: 19px; }
  54% { width: 0; left: 1px; top: 19px; }
  70% { width: 50px; left: -8px; top: 37px; }
  84% { width: 17px; left: 21px; top: 48px; }
  100% { width: 25px; left: 14px; top: 46px; }
}

@keyframes icon-line-long {
  0% { width: 0; right: 46px; top: 54px; }
  65% { width: 0; right: 46px; top: 54px; }
  84% { width: 55px; right: 0px; top: 35px; }
  100% { width: 47px; right: 8px; top: 38px; }
}

/* Download Ticket Styles */
#receipt-preview {
  background: #fff;
  color: #000;
  padding: 20px;
  border-radius: 8px;
  width: 350px;
  font-family: 'Outfit', sans-serif;
}


/* ---- GLOBAL UPGRADES ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- NAVBAR ENHANCEMENTS ---- */
#navbar {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25) !important;
  transition: var(--transition-smooth) !important;
}

#navbar .button-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35) !important;
  transition: var(--transition-smooth) !important;
  position: relative;
  overflow: hidden;
}

#navbar .button-whatsapp::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  animation: shimmerBtn 3s infinite;
}

@keyframes shimmerBtn {
  0% {
    left: -60%;
  }

  100% {
    left: 160%;
  }
}

#navbar .button-whatsapp:hover {
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ---- MAIN CONTAINER ---- */
main {
  position: relative;
}

/* ---- RAFFLE CARD / HERO SECTION ---- */
/* Raffle image elegant border */
.lg\:sticky img,
img[src*="rifas"],
img[alt="imagen-de-la-rifa"],
.aspect-square img {
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* Subtle floating animation for raffle image */
@keyframes floatImage {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ---- INFO BADGES (Fecha / Precio boleto) ---- */
.flex.flex-row.gap-4.bg-\[,
[class*="bg-"][class*="rounded"] {
  transition: var(--transition-smooth);
}

/* Date & price info pill upgrades */
.body-small-regular,
.body-small-medium {
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: 0.2px;
}

/* ---- PRICE BUTTONS (2, 5, 10, 15...) ---- */
button.price-button,
button.price-button-popular {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  border-radius: 16px !important;
  transition: var(--transition-smooth) !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

button.price-button:hover,
button.price-button-popular:hover {
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35) !important;
}

button.price-button:active,
button.price-button-popular:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Shine effect on price buttons */
button.price-button::before,
button.price-button-popular::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}

button.price-button:hover::before,
button.price-button-popular:hover::before {
  left: 150%;
}

button.price-button-pressed,
button.price-button-popular-pressed {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  transform: scale(0.98) !important;
}

/* ---- PROGRESS BAR ---- */
.progress-actual {
  background: linear-gradient(90deg, #f4c542, #ff9800, #f4c542) !important;
  background-size: 200% 100% !important;
  animation: progressShimmer 2s ease infinite !important;
  border-radius: 22px !important;
  box-shadow: 0 0 10px rgba(244, 197, 66, 0.6) !important;
}

@keyframes progressShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.progress-total {
  border-radius: 12px !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
}

/* ---- PAY / BUY BUTTON ---- */
#btCompra,
#btCompra_Footer {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  letter-spacing: 0.5px !important;
  border-radius: 50px !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
  transition: var(--transition-smooth) !important;
}

#btCompra:hover,
#btCompra_Footer:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  filter: brightness(1.1) !important;
}

#btCompra::after,
#btCompra_Footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Animate pay button pulse when ready */
@keyframes payPulse {

  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 6px 30px rgba(244, 197, 66, 0.5);
  }
}

#btCompra {
  animation: payPulse 2.5s ease-in-out infinite;
}

/* ---- HEADINGS ---- */
.heading-small-medium,
.heading-xsmall-medium,
h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif !important;
}

/* Raffle title styling */
.heading-small-medium {
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  line-height: 1.2 !important;
}

/* ---- ICON BUTTONS (admin/logout) ---- */
.icon-button {
  transition: var(--transition-smooth) !important;
  backdrop-filter: blur(10px);
}

.icon-button:hover {
  transform: scale(1.1) !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ---- NUMBERS GRID (selective mode) ---- */
.n {
  transition: var(--transition-fast) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.n:hover:not(.desactivada) {
  transform: scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.n.activa {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(76, 175, 80, 0.4) !important;
  transform: scale(1.05) !important;
}

/* ---- SELECTED TICKET BADGES ---- */
.n-select {
  border-radius: 8px !important;
  font-weight: 700 !important;
  transition: var(--transition-fast) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.n-select:hover {
  transform: scale(1.05) !important;
}

/* ---- MODAL DIALOG ---- */
dialog {
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(5px);
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---- FORM INPUTS ---- */
.input {
  border-radius: 0 !important;
  transition: var(--transition-smooth) !important;
  font-family: 'Outfit', sans-serif !important;
}

.input:focus {
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 4px 0 -2px rgba(255, 255, 255, 0.1) !important;
}

/* ---- PAYMENT METHOD BUTTONS ---- */
.metodo-box,
.metodo-selected {
  border-radius: 12px !important;
  transition: var(--transition-smooth) !important;
}

.metodo-box:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.metodo-selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35) !important;
}

/* ---- ACTION BUTTONS (Finalizar compra, etc) ---- */
.button-primary-brand {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  transition: var(--transition-smooth) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  position: relative;
  overflow: hidden;
}

.button-primary-brand:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35) !important;
  filter: brightness(1.08) !important;
}

.button-primary-brand:active {
  transform: translateY(0) scale(0.98) !important;
}

.button-primary-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* ---- LOADER ---- */
.lds-ring {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

.lds-ring div {
  border-color: #f4c542 transparent transparent transparent !important;
}

/* ---- SUCCESS TICKET NUMBERS (final modal) ---- */
.n-select,
span[class*="inline-block"][class*="rounded"] {
  border-radius: 10px !important;
  font-weight: 700 !important;
  transition: var(--transition-fast) !important;
}

/* ---- COUNTDOWN TIMER ---- */
[id*="countdown"],
[id*="timer"],
[id*="contador"] {
  font-family: 'Outfit', sans-serif !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700 !important;
}

/* ---- SPONSOR CAROUSEL ---- */
.sponsor-carousel,
.sponsor-container {
  border-radius: 16px !important;
  overflow: hidden;
}

/* ---- SCROLLBAR CUSTOM ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ---- TOAST NOTIFICATIONS ---- */
.swal2-popup {
  border-radius: 20px !important;
  backdrop-filter: blur(20px);
  font-family: 'Outfit', sans-serif !important;
}

.swal2-confirm {
  border-radius: 50px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
}

/* ---- RESPONSIVE TOUCH IMPROVEMENTS ---- */
@media (hover: none) {

  button.price-button:hover,
  button.price-button-popular:hover,
  .button-primary-brand:hover,
  #btCompra:hover {
    transform: none !important;
  }
}

/* ---- FADE IN ANIMATION FOR PAGE LOAD ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main>.container {
  animation: fadeInUp 0.5s ease-out both;
}