/* ── Секція 008 — Приєднуйся (форма) ── */

.join {
  position: relative;
  padding: 10px 0 20px;
  background: transparent !important;
  background-color: transparent !important;
}

.join__inner {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  background: transparent !important;
  background-color: transparent !important;
}

/* Картка форми */
.join__card {
  width: min(1100px, 100%);
  padding: 60px 20px;
  background: rgba(21, 40, 48, 0.9);
  border: 1px solid rgba(255, 231, 186, 0.3);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.join__subtitle {
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: rgba(255, 231, 186, 0.65);
  text-align: center;
  line-height: 1.5;
  margin-top: -16px;
}

.join__title {
  font-family: "u3", sans-serif;
  font-weight: 500;
  font-size: 38px;
  color: #ffe7ba;
  text-transform: uppercase;
  text-align: center;
  line-height: normal;
}

/* Форма */
.join__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
}

/* ── Поля форми ── */
.join__fields {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 960px;
}

.join__fields > .join__input {
  flex: 1 1 0;
  max-width: 300px;
  width: 100%;
  min-width: 0;
}

.join__col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.join__col .join__input {
  width: 355px;
  max-width: 355px;
}

/* ── Поле вводу ── */
.join__input {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 0;
  box-sizing: border-box;
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

/* Placeholder — opacity 40% */
.join__input::placeholder {
  color: #ffffff;
  opacity: 0.4;
}

/* СТЕЙТ: Focus */
.join__input:focus {
  border-color: #ffa600;
  box-shadow:
    0 0 0 1px #ffa600,
    0 0 12px rgba(255, 166, 0, 0.25);
  background: rgba(255, 255, 255, 0.16);
}

/* СТЕЙТ: Filled (є текст) */
.join__input:not(:placeholder-shown) {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.18);
}

/* СТЕЙТ: Error */
.join__input.error {
  border-color: #e8453c;
  box-shadow:
    0 0 0 1px #e8453c,
    0 0 10px rgba(232, 69, 60, 0.2);
}

.join__input.error::placeholder {
  color: #e8453c;
  opacity: 0.8;
}

/* ── Текстове поле (textarea) ── */
.join__textarea {
  width: 730px;
  min-height: 100px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.86);
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.join__textarea::placeholder {
  color: #ffffff;
  opacity: 0.4;
}

.join__textarea:focus {
  border-color: #ffa600;
  box-shadow:
    0 0 0 1px #ffa600,
    0 0 12px rgba(255, 166, 0, 0.25);
  background: rgba(255, 255, 255, 0.16);
}

.join__textarea:not(:placeholder-shown) {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.18);
}

.join__textarea.error {
  border-color: #e8453c;
  box-shadow:
    0 0 0 1px #e8453c,
    0 0 10px rgba(232, 69, 60, 0.2);
}

.join__textarea.error::placeholder {
  color: #e8453c;
  opacity: 0.8;
}

/* ── Captcha ── */
.join__captcha {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.join__captcha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.join__captcha-img {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  height: 50px;
}

.join__captcha-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.86);
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  letter-spacing: 2px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.join__captcha-input::placeholder {
  color: #ffffff;
  opacity: 0.4;
}

.join__captcha-input:focus {
  border-color: #ffa600;
  box-shadow:
    0 0 0 1px #ffa600,
    0 0 12px rgba(255, 166, 0, 0.25);
  background: rgba(255, 255, 255, 0.16);
}

.join__captcha-input.error {
  border-color: #e8453c;
  box-shadow:
    0 0 0 1px #e8453c,
    0 0 10px rgba(232, 69, 60, 0.2);
}

.join__captcha-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255, 231, 186, 0.3);
  border-radius: 0;
  cursor: pointer;
  padding: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.1s ease;
}

.join__captcha-refresh:hover {
  border-color: #ffa600;
  background: rgba(255, 166, 0, 0.1);
}

.join__captcha-refresh:active {
  transform: scale(0.95);
}

.join__captcha-refresh svg {
  width: 20px;
  height: 20px;
}

.join__hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── Тогл ── */
.join__toggle-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.join__toggle-label {
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  text-align: left;
  margin: 0;
}

.join__toggle {
  display: flex;
  gap: 6px;
}

/* Ховаємо нативний radio */
.join__toggle-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.join__toggle-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 42px;
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  /* СТЕЙТ: Default (Ні) */
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* СТЕЙТ: Active (Так / вибрано) */
.join__toggle-btn input[type="radio"]:checked + span {
  background: #ffa600;
  color: #001e28;
}

/* СТЕЙТ: Hover */
.join__toggle-btn:hover span {
  background: rgba(255, 255, 255, 0.2);
}

.join__toggle-btn input[type="radio"]:checked + span:hover {
  background: #ffb733;
}

/* ── Чекбокс ── */
.join__checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 460px;
  cursor: pointer;
}

/* Ховаємо нативний checkbox */
.join__checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Кастомний бокс */
.join__checkbox-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.24);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

/* СТЕЙТ: Checked — галочка */
.join__checkbox-box::after {
  content: "";
  display: none;
  width: 10px;
  height: 18px;
  border: 3px solid #001e28;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-2px);
}

.join__checkbox input[type="checkbox"]:checked ~ .join__checkbox-box {
  background: #ffa600;
  border-color: #ffa600;
}

.join__checkbox input[type="checkbox"]:checked ~ .join__checkbox-box::after {
  display: block;
}

/* СТЕЙТ: Focus (клавіатурна навігація) */
.join__checkbox input[type="checkbox"]:focus-visible ~ .join__checkbox-box {
  border-color: #ffa600;
  box-shadow: 0 0 0 2px rgba(255, 166, 0, 0.4);
}

/* СТЕЙТ: Error (не відмічено при сабміті) */
.join__checkbox.error .join__checkbox-box {
  border-color: #e8453c;
}

.join__checkbox-text {
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  line-height: 20px;
}

.join__policy-link {
  color: #ffa600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.join__policy-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Кнопка Submit ── */
.join__submit {
  width: 300px;
  min-height: 56px;
  height: auto;
  padding: 12px 24px;
  background: #ffa600;
  border: none;
  font-family: "u3", sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #001e28;
  text-transform: uppercase;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  box-sizing: border-box;
  transition:
    filter 0.2s ease,
    transform 0.1s ease;
}

/* СТЕЙТ: Hover */
.join__submit:hover {
  filter: brightness(1.1);
}

/* СТЕЙТ: Active (натиснуто) */
.join__submit:active {
  filter: brightness(0.95);
  transform: translateY(1px);
}

/* СТЕЙТ: Disabled (відправка) */
.join__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}

/* СТЕЙТ: Error (помилка відправки) */
.join__submit--error {
  background: #e8453c !important;
  color: #ffffff !important;
}

/* СТЕЙТ: Success (успішно відправлено) */
.join__submit.success {
  background: #4ade80 !important;
  color: #001e28 !important;
}

/* СТЕЙТ: Error (помилка відправки) */
.join__submit.error {
  background: #e8453c !important;
  color: #ffffff !important;
}

/* ── Success стейт ── */
.join__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.join__success-icon {
  opacity: 0.9;
}

.join__success-title {
  font-family: "u3", sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #ffe7ba;
  text-transform: uppercase;
}

.join__success-text {
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: rgba(255, 231, 186, 0.75);
  max-width: 480px;
  line-height: 1.6;
}

.join__success-timer {
  font-family: "u3", sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: rgba(255, 231, 186, 0.3);
  margin-top: 8px;
}

.join__success-timer span {
  font-weight: 600;
  color: rgba(255, 231, 186, 0.5);
}
