/* Alap panel – balról betűszó, 50vw szélesség */
/* Font importálás a PHP-ban történik - ne duplikáljuk! */

/* CSS változók - kerék méretek és színek */
:root {
  --wheel-size-desktop: 680px;
  --wheel-size-laptop: 580px;
  --wheel-size-tablet: 380px;
  --wheel-size-mobile: 350px;
  --wheel-size-mobile-small: 280px;
  --wheel-size-mobile-tiny: 260px;

  --pointer-size-desktop: 25px;
  --pointer-height-desktop: 40px;
  --pointer-size-laptop: 22px;
  --pointer-height-laptop: 35px;
  --pointer-size-tablet: 16px;
  --pointer-height-tablet: 26px;
  --pointer-size-mobile: 15px;
  --pointer-height-mobile: 24px;
  --pointer-size-mobile-small: 12px;
  --pointer-height-mobile-small: 20px;
  --pointer-size-mobile-tiny: 10px;
  --pointer-height-mobile-tiny: 18px;
}

/* Animációs kulcsképek */
@keyframes slideInFromLeft {
  0% {
    left: -50vw;
    opacity: 0;
  }
  100% {
    left: 0;
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  0% {
    left: 0;
    opacity: 1;
  }
  100% {
    left: -50vw;
    opacity: 0;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#spinwheel-panel {
  position: fixed;
  top: 0;
  left: -50vw;
  width: 50vw;
  height: 100vh;
  background-image: linear-gradient(to top, #5E0102 0%, #F90415 100%);
  box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  z-index: 99999;
  display: flex;
  align-items: center;
  padding: 24px;
  transition: none;
  font-family: "Helvetica", Sans-serif;
  opacity: 0;
}

#spinwheel-panel.show {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

#spinwheel-panel.hide {
  animation: slideOutToLeft 0.4s ease-in forwards;
}

#spinwheel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  align-items: center;
}

.spinwheel-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#spinwheel-left p {
    font-size: 16px;
    line-height: 27px;
    margin: 0;
    font-family: "Poppins", Sans-serif;
}

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], textarea, select {
    color: var(--contrast);
    background-color: #ffffff;
    border-color: var(--base);
    width: 100%;
    padding: 15px 10px !important;
}

.spinwheel-btn {
    display: inline-block;
    background: #ffffff;
    color: #650003;
        width: 100%;
    border: none;
    border-radius: 40px;
    padding: 13px 75px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    transition: all 0.3s ease;
}

.spinwheel-btn:hover {
    background: #f8f8f8;
        color: #650003;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.spinwheel-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#spinwheel-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    background-color: white;
    color: #BB8203;
    border-radius: 50px;
    width: 25px;
    height: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#spinwheel-close:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

#spinwheel-canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#spinwheel-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: white;
    font-size: 17px;
    align-items: flex-start;
    padding-right: 25px;
}

#spinwheel-left h2 {
    color: white;
    font-size: 35px;
    font-weight: 700;
    font-family: "Poppins", Sans-serif;
}

.spinwheel-input::placeholder {
    color: #aaa;
    font-size: 15px;
     font-family: "Poppins", Sans-serif;
}


/* Nyereményszöveg stílus */
.win-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: white;
    text-align: center;
    align-items: center;
    padding: 40px 25px;
    animation: fadeInUp 0.8s ease-out;
}

.win-section h2 {
    color: #fff;
    font-size: 50px;
    font-weight: 700;
    margin: 0;
}

.win-section h3 {
    color: #ffffff;
    font-size: 30px;
    font-weight: 600;
    margin: 0;
}

.win-section p {
    color: white;
    font-size: 18px;
    line-height: 1.5;
    margin: 10px 0;
}


.claim-btn {
    background: #FFD700;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: 700;
    background-color: white;
    color: #BB8203;
    border-radius: 50px;
}

.claim-btn:hover {
    transform: translateY(-3px);
}

/* Vesztés szekció stílus */
.lose-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: white;
    text-align: center;
    align-items: center;
    padding: 40px 25px;
    animation: fadeInUp 0.8s ease-out;
}

.lose-section h2 {
    color: #FF6B6B;
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.lose-section p {
    color: white;
    font-size: 18px;
    line-height: 1.5;
    margin: 10px 0;
}

.close-btn {
    background: #888;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
}

.close-btn:hover {
    background: #777;
    transform: translateY(-2px);
}

/* Pointer (jelölő) a kerék tetején */
.wheel-container {
  position: relative;
  margin-left: -110px;
  /* Responsív kerék méret - alkalmazkodik a képernyő méretéhez */
  width: min(680px, 45vw, calc(50vw - 60px)) !important;
  height: min(680px, 45vw, calc(50vw - 60px)) !important;
  max-width: 680px !important;
  max-height: 680px !important;
  min-width: 250px !important;
  min-height: 250px !important;
}

/* Kerék méret testreszabási lehetőségek */
.wheel-container.wheel-small {
  width: 300px !important;
  height: 300px !important;
}

.wheel-container.wheel-medium {
  width: 400px !important;
  height: 400px !important;
}

.wheel-container.wheel-large {
  width: 500px !important;
  height: 500px !important;
}

.wheel-container.wheel-xlarge {
  width: 600px !important;
  height: 600px !important;
}

/* A kerék canvas elemére árnyék alkalmazása */
.wheel-container canvas {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3)) 
          drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  border-radius: 50%;
}

/* Nagy desktop - kisebb kerék és szöveg igazítás */
@media (max-width: 1800px) {
  .wheel-container {
    margin-left: -80px !important;
    width: min(580px, 42vw) !important;
    height: min(580px, 42vw) !important;
  }

  .wheel-container::after {
    border-left: var(--pointer-size-laptop) solid transparent;
    border-right: var(--pointer-size-laptop) solid transparent;
    border-top: var(--pointer-height-laptop) solid #ffffff;
  }
#spinwheel-inner {
    gap: 10px;
}
  #spinwheel-left {
    padding-right: 20px;
  }

  #spinwheel-left h2 {
    font-size: 25px;
  }

  #spinwheel-left p {
    font-size: 15px;
    line-height: 1.6;
  }

  .spinwheel-btn {
    font-size: 17px;
    padding: 12px 70px;
  }

  .spinwheel-gdpr-label {
    font-size: 12px;
  }

  .spinwheel-gdpr-text {
    font-size: 12px;
  }
}



/* Kis laptop/nagy tablet méretek */
@media (max-width: 1600px) {
  #spinwheel-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wheel-container {
    margin-left: 0 !important;
    width: min(380px, 55vw) !important;
    height: min(380px, 55vw) !important;
    margin: 0 auto !important;
    order: 1;
  }

  .wheel-container::after {
    border-left: var(--pointer-size-tablet) solid transparent;
    border-right: var(--pointer-size-tablet) solid transparent;
    border-top: var(--pointer-height-tablet) solid #ffffff;
    top: 8px;
  }

  #spinwheel-left {
    order: 2;
    padding-right: 0;
    align-items: center;
    text-align: center;
  }

  #spinwheel-panel {
    padding: 20px;
  }

  #spinwheel-left h2 {
    font-size: 26px;
  }

  #spinwheel-left p {
    font-size: 14px;
  }

  .spinwheel-btn {
    font-size: 16px;
    padding: 12px 60px;
  }

  .spinwheel-input {
    font-size: 15px;
  }
}

.wheel-container::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: var(--pointer-size-desktop) solid transparent;
    border-right: var(--pointer-size-desktop) solid transparent;
    border-top: var(--pointer-height-desktop) solid #ffffff;
    z-index: 10;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Mobil: teljes szélességre, felülről */
@media (max-width: 900px) {
  #spinwheel-panel {
    width: 100vw;
    left: -100vw;
    padding: 20px 16px;
    overflow-y: auto;
  }

  @keyframes slideInFromLeft {
    0% {
      left: -100vw;
      opacity: 0;
    }
    100% {
      left: 0;
      opacity: 1;
    }
  }

  @keyframes slideOutToLeft {
    0% {
      left: 0;
      opacity: 1;
    }
    100% {
      left: -100vw;
      opacity: 0;
    }
  }

  #spinwheel-panel.show {
    animation: slideInFromLeft 0.6s ease-out forwards;
  }

  #spinwheel-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Mobil kerék mérete */
  .wheel-container {
    margin-left: 0 !important;
    width: min(70vw, 350px) !important;
    height: min(70vw, 350px) !important;
    max-width: 350px !important;
    max-height: 350px !important;
    min-width: 260px !important;
    min-height: 260px !important;
    margin: 0 auto !important;
    order: 1;
  }

  .wheel-container canvas {
    width: 100% !important;
    height: 100% !important;
  }

  .wheel-container::after {
    border-left: var(--pointer-size-mobile) solid transparent;
    border-right: var(--pointer-size-mobile) solid transparent;
    border-top: var(--pointer-height-mobile) solid #ffffff;
    top: 6px;
  }

  #spinwheel-left {
    padding-right: 0;
    align-items: center;
    text-align: center;
    order: 2;
    gap: 12px;
  }

  #spinwheel-left h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  #spinwheel-left p {
    font-size: 14px;
    line-height: 1.5;
  }

  #spinwheel-left ul {
    font-size: 14px;
    padding-left: 20px;
  }

  .spinwheel-form {
    gap: 8px;
  }

  .spinwheel-input {
    font-size: 14px;
    padding: 12px 10px !important;
  }

  .spinwheel-btn {
    font-size: 16px;
    padding: 13px 50px;
    margin-top: 4px;
  }

  #spinwheel-close {
    width: 22px;
    height: 22px;
    padding: 18px;
    font-size: 24px;
  }

  /* Nyeremény szekciók */
  .win-section, .lose-section {
    padding: 30px 20px;
  }

  .win-section h2, .lose-section h2 {
    font-size: 32px;
  }

  .win-section h3 {
    font-size: 22px;
  }

  .win-section p, .lose-section p {
    font-size: 15px;
  }
}

/* Extra kis mobilokra (pl. iPhone SE) */
@media (max-width: 480px) {
  #spinwheel-panel {
    padding: 16px 12px;
  }

  #spinwheel-inner {
    gap: 16px;
  }

  .wheel-container {
    width: min(75vw, 280px) !important;
    height: min(75vw, 280px) !important;
    max-width: 280px !important;
    max-height: 280px !important;
    min-width: 240px !important;
    min-height: 240px !important;
  }

  .wheel-container::after {
    border-left: var(--pointer-size-mobile-small) solid transparent;
    border-right: var(--pointer-size-mobile-small) solid transparent;
    border-top: var(--pointer-height-mobile-small) solid #ffffff;
    top: 5px;
  }

  #spinwheel-left {
    gap: 10px;
  }

  #spinwheel-left h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  #spinwheel-left p {
    font-size: 13px;
  }

  #spinwheel-left ul {
    font-size: 13px;
    padding-left: 18px;
  }

  .spinwheel-form {
    gap: 7px;
  }

  .spinwheel-input {
    font-size: 13px;
    padding: 11px 8px !important;
  }

  .spinwheel-btn {
    padding: 12px 45px;
    font-size: 15px;
  }

  #spinwheel-close {
    width: 20px;
    height: 20px;
    padding: 16px;
    font-size: 22px;
  }

  .win-section, .lose-section {
    padding: 25px 16px;
  }

  .win-section h2, .lose-section h2 {
    font-size: 28px;
  }

  .win-section h3 {
    font-size: 20px;
  }

  .win-section p, .lose-section p {
    font-size: 14px;
  }
}

/* Ultra kis képernyők (pl. régi telefonok) */
@media (max-width: 360px) {
  #spinwheel-panel {
    padding: 12px 10px;
  }

  #spinwheel-inner {
    gap: 14px;
  }

  .wheel-container {
    width: min(80vw, 260px) !important;
    height: min(80vw, 260px) !important;
    max-width: 260px !important;
    max-height: 260px !important;
    min-width: 220px !important;
    min-height: 220px !important;
  }

  .wheel-container::after {
    border-left: var(--pointer-size-mobile-tiny) solid transparent;
    border-right: var(--pointer-size-mobile-tiny) solid transparent;
    border-top: var(--pointer-height-mobile-tiny) solid #ffffff;
    top: 4px;
  }

  #spinwheel-left {
    gap: 8px;
  }

  #spinwheel-left h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  #spinwheel-left p {
    font-size: 12px;
    line-height: 1.4;
  }

  #spinwheel-left ul {
    font-size: 12px;
    padding-left: 16px;
  }

  .spinwheel-form {
    gap: 6px;
  }

  .spinwheel-input {
    font-size: 12px;
    padding: 10px 8px !important;
  }

  .spinwheel-btn {
    padding: 11px 40px;
    font-size: 14px;
  }

  #spinwheel-close {
    width: 18px;
    height: 18px;
    padding: 14px;
    font-size: 20px;
  }

  .win-section, .lose-section {
    padding: 20px 12px;
  }

  .win-section h2, .lose-section h2 {
    font-size: 24px;
  }

  .win-section h3 {
    font-size: 18px;
  }

  .win-section p, .lose-section p {
    font-size: 13px;
  }
}

/* GDPR checkbox stílusok */
.spinwheel-gdpr {
  margin-top: 10px;
  width: 100%;
}

.spinwheel-gdpr-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  font-family: "Poppins", Sans-serif;
  /* Nagyobb érintési terület mobilon - minimum 44x44px az Apple HIG szerint */
  padding: 8px 4px;
  margin: -8px -4px;
}

.spinwheel-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 3px 0 0 0;
  cursor: pointer;
  /* Sötét accent-color a jobb láthatóságért - piros háttér miatt */
  accent-color: #BB8203;
  /* Nagyobb érintési terület mobilon */
  transform: scale(1.2);
  transform-origin: left top;
  /* Egyértelmű megjelenés - vastag border */
  border: 2px solid #ffffff;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.9);
  /* iOS Safari fix - disable default appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Amikor bejelölve van */
  position: relative;
}

.spinwheel-checkbox:checked {
  background-color: #BB8203;
  border-color: #ffffff;
}

/* Custom pipa ikon amikor be van jelölve - minden böngészőben egyforma */
.spinwheel-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.spinwheel-gdpr-text {
  flex: 1;
  font-size: 13px;
  color: #fff;
}

.spinwheel-gdpr-text a {
  color: #FFD700;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.spinwheel-gdpr-text a:hover {
  color: #FFF;
  text-decoration: none;
}

/* Mobil GDPR */
@media (max-width: 900px) {
  .spinwheel-gdpr-label {
    font-size: 12px;
  }

  .spinwheel-gdpr-text {
    font-size: 12px;
  }

  .spinwheel-checkbox {
    width: 22px;
    height: 22px;
    /* Még nagyobb mobilon a könnyebb kattintásért */
    transform: scale(1.4);
    margin: 4px 6px 0 0;
  }

  /* Mobilon nagyobb pipa */
  .spinwheel-checkbox:checked::after {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .spinwheel-gdpr-label {
    font-size: 11px;
  }

  .spinwheel-gdpr-text {
    font-size: 11px;
  }

  .spinwheel-checkbox {
    width: 24px;
    height: 24px;
    /* Extra nagy kis mobilokon */
    transform: scale(1.6);
    margin: 5px 8px 0 0;
  }

  /* Kis mobilon még nagyobb pipa */
  .spinwheel-checkbox:checked::after {
    font-size: 20px;
  }
}