/*
 Theme Name: GP Wheel Child
 Theme URI: https://example.com/
 Description: GeneratePress child theme with Spin Wheel on front page.
 Author: You
 Template: generatepress
 Version: 1.0.0
*/
body {
  background-color: rgba(33, 77, 52, 0.95);
  font-family: "Unbounded", sans-serif;
}

.inside-header.grid-container {
  background-color: #1E452F;
  padding-top: clamp(0.625rem, 0.5643rem + 0.2589vw, 0.875rem);
  padding-bottom: clamp(0.625rem, 0.5643rem + 0.2589vw, 0.875rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}

.inside-header,
.inside-site-info {
  padding-right: clamp(1rem, -0.4574rem + 6.2181vw, 9.375rem);
  padding-left: clamp(1rem, -0.4574rem + 6.2181vw, 9.375rem);
}


.front-page-content.inside-site-info {
  padding-top: clamp(2.5rem, 2.0449rem + 1.9417vw, 4.375rem);
  padding-bottom: 40px;
  background-color: #204D33;
  width: 100%;
  background-image: url('/wp-content/uploads/2025/10/main_pc.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.front-page-content_l h1 {
  font-size: clamp(2rem, 1.4842rem + 2.2006vw, 4.125rem);
  margin: 0;
  color: #fff;
  font-weight: 400;
  line-height: 130%;
  text-transform: uppercase;
}

span.light {
  color: #FAEC27;
  font-weight: 700;
}

span.light-green {
  color: #CDDC3A;
  font-weight: 700;
}

.front-page-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1.875rem, -0.0971rem + 8.4142vw, 10rem);
  box-sizing: border-box;
}

.front-page-content_l {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.front-page-content_r {
  flex: 0 0 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: clamp(0.938rem, 0.7106rem + 0.9704vw, 1.875rem);
  padding: clamp(1.25rem, 0.7949rem + 1.9417vw, 3.125rem);
  box-sizing: border-box;
}

h2.apply-title {
  color: #204D33;
  font-size: clamp(1.25rem, 1.0680rem + 0.7767vw, 2rem);
  font-weight: 700;
  line-height: 120%;
  margin-bottom: clamp(1.25rem, 0.9466rem + 1.2945vw, 2.5rem);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  border: none;
  border-bottom: 2px solid #717171;
  font-size: clamp(1rem, 0.9393rem + 0.2589vw, 1.25rem);
  padding: 0 0 clamp(0.5rem, 0.3847rem + 0.4919vw, 0.975rem) 0;
  background-color: transparent;
  color: #717171;
  line-height: 120%;
  white-space: normal;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: clamp(1.25rem, 1.0983rem + 0.6472vw, 1.875rem);
  outline: none;
  box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: none;
  background-color: transparent;
}

/* Для iOS Safari — отключаем подсветку синей рамкой */
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
}

/* Чтобы не было жёлтого autofill-фона в Chrome */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 5000s ease-in-out 0s;
}

p.form-note {
  color: #343A40;
  margin-bottom: clamp(1.25rem, 1.0983rem + 0.6472vw, 1.875rem);
  font-size: clamp(0.75rem, 0.6893rem + 0.2589vw, 1rem);
  line-height: 140%;
  font-weight: 400;
}

button.apply-btn {
  font-size: clamp(1rem, 0.9393rem + 0.2589vw, 1.25rem);
  font-weight: 500;
  line-height: 120%;
  width: 100%;
  text-transform: uppercase;
  color: #fff;
  border-radius: 15px;
  padding: clamp(1rem, 0.9697rem + 0.1294vw, 1.125rem) 0;
  background-color: #4CAF50;
}

.wheel {
  display: none;
  position: relative;
  flex-direction: column;
}

header#masthead {
  position: relative;
  z-index: 4000;
}

.wheel-bg {
  position: relative;
  width: 800px;
  height: 700px;
  margin: 0 auto;
}

.wheel-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 800px;
  z-index: 1;
  pointer-events: none;
}

#wheelCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 800px;
  z-index: 2;
}

.wheel-bg::before {
  content: "";
  position: absolute;
  top: 98px;
  left: 50%;
  transform: translateX(-48%);
  width: 121px;
  height: 75px;
  background: url('/wp-content/uploads/2025/10/arrow.svg') no-repeat center;
  background-size: contain;
  z-index: 4;
  pointer-events: none;
}

.wheel-bottom {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  position: relative;
  z-index: 22;
  padding-bottom: 60px;
}

.spin-btn {
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 40px;
  font-size: 18px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s;
}

.spin-btn:hover {
  background: #43a047;
}

.wheel-bottom span {
  color: #fff;
  font-weight: bold;
  font-size: 22px;
  pointer-events: none;
}

/* === Модалка подарка === */
.gift-modal {
  position: fixed;
  inset: 0;
  background: #203B23;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  overflow: hidden;
  /* чтобы канвас не выходил за границы */
}

.gift-content {
  position: relative;
  text-align: center;
  background: rgba(33, 77, 52, 0.95);
  padding: 40px;
  border-radius: 20px;
  animation: fadeInUp 0.6s ease;
  z-index: 3200;
  width: calc(100% - 16px);
  max-width: 860px;
  box-sizing: border-box;
}

@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.gift-icon {
  width: clamp(8.75rem, 7.3835rem + 5.8304vw, 14.38rem);
}

.gift-content h2 {
  font-family: 'Unbounded', sans-serif;
  color: #fff;
  font-size: clamp(1.5rem, 1.4090rem + 0.3883vw, 1.875rem);
  margin-bottom: 20px;
  line-height: normal;
}

.gift-subtitle {
  color: #fff;
  font-size: clamp(1rem, 0.8786rem + 0.5178vw, 1.5rem);
  margin-bottom: 30px;
  line-height: 140%;
}

.gift-close {
  background: #4CAF50;
  border: none;
  color: white;
  padding: 20px 100px;
  border-radius: 10px;
  font-size: clamp(1.375rem, 1.3447rem + 0.1294vw, 1.5rem);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.gift-close:hover {
  background: #43a047;
}

/* === Canvas конфетти === */
#confettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3100;
  /* ниже белого блока */
}

.site-content {
  display: flex;
  justify-content: center;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.after-wheel {
  display: none;
}

.after-wheel.inside-site-info {
  padding-top: clamp(3.125rem, 2.6699rem + 1.9417vw, 5rem);
  ;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  height: 90vh;
  width: 100%;
  box-sizing: border-box;
  background-image: url('/wp-content/uploads/2025/10/a_bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom;
}

h2.after-wheel-title {
  font-size: clamp(1.5rem, 1.3180rem + 0.7767vw, 2.25rem);
  font-weight: 600;
  line-height: 160%;
  color: #fff;
  max-width: 800px;
  margin: 0 auto clamp(1.25rem, 0.9466rem + 1.2945vw, 2.5rem);
}

h3.after-wheel-subtitle {
  color: #F4C33E;
  font-size: clamp(1.25rem, 1.0073rem + 1.0356vw, 2.25rem);
  font-weight: 700;
  line-height: 160%;
  margin-bottom: clamp(1.875rem, 1.5716rem + 1.2945vw, 3.125rem);
}

a.btn_insta {
  display: inline-flex;
  align-items: center;
  background-color: #4CAF50;
  border-radius: 15px;
  width: 100%;
  justify-content: center;
  height: clamp(3.375rem, 3.1626rem + 0.9061vw, 4.25rem);
  align-items: center;
  max-width: 499px;
  text-decoration: none;
  color: #fff;
  font-size: clamp(1rem, 0.9393rem + 0.2589vw, 1.25rem);
  font-weight: 600;
  line-height: 120%;
  column-gap: 10px;
}

@media screen and (max-width: 768px) {
  .after-wheel.inside-site-info {
    background-image: url('/wp-content/uploads/2025/10/a_bg_m.jpg');
    background-position: 100% 0%; 
  }

  .front-page-content_l {
    width: 100%;
  }

  .front-page-content_l h1 {
    text-align: left;
    max-width: 350px;
  }

  .wheel {
    margin-top: 60px;
  }

  /* === Контейнер колеса === */
  .wheel-bg {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 370px;
    /* немного выше квадрата, чтобы не обрезало низ */
    margin: 0 auto;
  }

  .wheel-bg-img,
  #wheelCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* сохраняем целый круг */
    z-index: 2;
  }

  /* === Стрелка === */
  .wheel-bg::before {
    content: "";
    position: absolute;
    top: 6px;
    /* опускаем стрелку чуть ниже, чтобы она не отрывалась от колеса */
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 42px;
    background: url('/wp-content/uploads/2025/10/arrow.svg') no-repeat center;
    background-size: contain;
    z-index: 4;
    pointer-events: none;
  }

  /* === Блок под колесом === */
  .wheel-bottom {
    margin-top: -10px;
    /* визуально приближаем подпись к колесу */
    padding-bottom: 40px;
  }

  .wheel-bottom span {
    font-size: 16px;
  }

  .spin-btn {
    font-size: 16px;
    padding: 10px 28px;
  }

  /* === Основной фон страницы === */
  .front-page-content.inside-site-info {
    background-image: url('/wp-content/uploads/2025/10/main_mob.jpg');
    background-size: cover;
    background-position: top center;
  }

  /* === Вспомогательные правки верстки === */
  .front-page-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .inside-header,
  .inside-site-info {
    padding: 0 16px;
  }

  .inside-header.grid-container img {
    height: 40px;
  }

  /* === Селект в форме === */
  .apply-form select {
    width: 100%;
    appearance: none;
    background-image: url('/wp-content/uploads/2025/10/Vector.svg');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px auto;
    padding-right: 30px;
    white-space: normal;
    line-height: 1.4;
  }

  .apply-form select option[disabled] {
    color: #717171;
  }

  .apply-form select:valid {
    color: #4CAF50;
  }

  @supports (-webkit-touch-callout: none) {
    .apply-form select option {
      white-space: normal !important;
      word-break: break-word !important;
    }
  }
}

input.input-valid,
select.input-valid {
  border-bottom: 2px solid #4CAF50 !important;
  color: #4CAF50;
}

input.input-valid::placeholder {
  color: #4CAF50;
}

input.input-error,
select.input-error {
  border-bottom: 2px solid #F3705A !important;
  color: #F3705A;
  margin-bottom: 4px;
}

input.input-error::placeholder {
  color: #F3705A;
}

button.apply-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
