/* ============================================
   public/assets/css/register.css
   Стили для страницы регистрации.
   Взяты из макета Регистрация.html + disabled.
   ============================================ */

/* === БАЗА === */
.kv-reg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #3A4A5E;
  line-height: 1.5;
  background: #FFFFFF;
  overflow-x: hidden;
}
.kv-reg * { box-sizing: border-box; }

/* === ЛЕВАЯ ЧАСТЬ === */
.kv-reg-left {
  background: #FFF9F2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.5vw, 48px) clamp(16px, 4vw, 40px);
  min-height: 100vh;
  min-height: 100dvh;
}
.kv-reg-box {
  width: 100%;
  max-width: clamp(300px, 90%, 460px);
}

/* Заголовок */
.kv-reg-head {
  text-align: center;
  margin-bottom: clamp(14px, 2.4vw, 22px);
}
.kv-reg-logo {
  display: inline-block;
  text-decoration: none;
  color: #3A4A5E;
  font-weight: 700;
  font-size: clamp(15px, 2vw, 17px);
  margin-bottom: clamp(8px, 1.4vw, 14px);
}
.kv-reg-title {
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 700;
  margin: 0 0 6px;
  color: #3A4A5E;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.kv-reg-sub {
  font-size: clamp(12px, 1.5vw, 14px);
  color: #7A8A9E;
  margin: 0;
  line-height: 1.45;
}

/* Соцсети */
.kv-reg-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1.2vw, 10px);
  margin-bottom: clamp(12px, 2vw, 18px);
}
.kv-reg-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(8px, 1.4vw, 12px) clamp(8px, 1.5vw, 14px);
  border-radius: 10px;
  text-decoration: none;
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 600;
  color: #3A4A5E;
  background: #FFFFFF;
  border: 2px solid #E8ECF1;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  min-height: 42px;
  min-width: 0;
}
.kv-reg-social-btn:hover {
  background: #FFF9F2;
  border-color: #FF8C1E;
}
.kv-reg-social-full { grid-column: 1 / -1; }
.kv-reg-social-icon {
  font-size: clamp(12px, 1.5vw, 14px);
  flex-shrink: 0;
}

/* Разделитель */
.kv-reg-divider {
  position: relative;
  text-align: center;
  margin: clamp(10px, 1.8vw, 14px) 0 clamp(8px, 1.5vw, 12px);
}
.kv-reg-divider:before {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: #E8ECF1;
}
.kv-reg-divider span {
  position: relative;
  background: #FFF9F2;
  padding: 0 12px;
  font-size: clamp(10px, 1.2vw, 11px);
  color: #7A8A9E;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Форма */
.kv-reg-form { margin-bottom: clamp(10px, 1.8vw, 16px); }
.kv-reg-field {
  position: relative;
  margin-bottom: clamp(8px, 1.4vw, 12px);
}
.kv-reg-field input {
  width: 100%;
  padding: clamp(11px, 1.6vw, 14px) clamp(14px, 2vw, 16px);
  border: 2px solid #E8ECF1;
  border-radius: 10px;
  font-size: max(16px, clamp(14px, 1.6vw, 15px));
  background: #FFFFFF;
  color: #3A4A5E;
  transition: border-color 0.15s;
  font-family: inherit;
  min-height: 44px;
}
.kv-reg-field input::placeholder { color: #B0BCCB; }
.kv-reg-field input:focus {
  outline: none;
  border-color: #FF8C1E;
}
.kv-reg-field-pass input { padding-right: 44px; }
.kv-reg-pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 15px;
  cursor: pointer;
  opacity: 0.5;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kv-reg-pass-toggle:hover { opacity: 1; }

/* Возраст ребёнка */
.kv-reg-age {
  margin-bottom: clamp(10px, 1.6vw, 14px);
}
.kv-reg-age-label {
  display: block;
  font-size: clamp(12px, 1.4vw, 13px);
  font-weight: 700;
  color: #3A4A5E;
  margin-bottom: 8px;
}
.kv-reg-age-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kv-reg-age-option {
  cursor: pointer;
  position: relative;
}
.kv-reg-age-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kv-reg-age-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: clamp(10px, 1.5vw, 14px) 8px;
  background: #FFFFFF;
  border: 2px solid #E8ECF1;
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
  min-height: 70px;
  text-align: center;
}
.kv-reg-age-emoji {
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1;
}
.kv-reg-age-text {
  font-size: clamp(12px, 1.5vw, 13px);
  font-weight: 700;
  color: #3A4A5E;
}
.kv-reg-age-option input:checked + .kv-reg-age-box {
  border-color: #FF8C1E;
  background: #FFF5E8;
}
.kv-reg-age-option input:focus-visible + .kv-reg-age-box {
  outline: 2px solid #FF8C1E;
  outline-offset: 2px;
}

/* СОГЛАСИЯ */
.kv-reg-agreements {
  margin-bottom: clamp(10px, 1.6vw, 14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kv-reg-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: clamp(11px, 1.3vw, 12px);
  color: #5A6B82;
  line-height: 1.45;
  user-select: none;
}
.kv-reg-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #FF8C1E;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.kv-reg-checkbox a {
  color: #FF8C1E;
  text-decoration: underline;
  font-weight: 600;
}
.kv-reg-checkbox a:hover {
  color: #E67A0F;
}
.kv-reg-checkbox-optional {
  opacity: 0.85;
}

/* Кнопка */
.kv-reg-submit {
  width: 100%;
  padding: clamp(12px, 1.8vw, 14px);
  border: none;
  border-radius: 10px;
  background: #FF8C1E;
  color: #FFFFFF;
  font-size: clamp(14px, 1.7vw, 15px);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  font-family: inherit;
  min-height: 46px;
}
.kv-reg-submit:hover:not(:disabled) { opacity: 0.88; }
.kv-reg-submit:active:not(:disabled) { opacity: 0.75; }

/* Заблокированная кнопка — пока не отмечены 3 обязательных согласия */
.kv-reg-submit:disabled {
  background: #D8DEE7;
  color: #FFFFFF;
  cursor: not-allowed;
  opacity: 1;
}

.kv-reg-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: clamp(11px, 1.3vw, 12px);
  color: #7A8A9E;
}

/* Войти */
.kv-reg-login {
  text-align: center;
  font-size: clamp(12px, 1.5vw, 13px);
  color: #7A8A9E;
  margin-top: 12px;
}
.kv-reg-login a {
  color: #FF8C1E;
  font-weight: 700;
  text-decoration: none;
}
.kv-reg-login a:hover { text-decoration: underline; }

/* === ПРАВАЯ ЧАСТЬ === */
.kv-reg-right {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.5vw, 48px) clamp(16px, 4vw, 40px);
  min-height: 100vh;
  min-height: 100dvh;
}
.kv-reg-right-box {
  width: 100%;
  max-width: clamp(300px, 90%, 440px);
}
.kv-reg-vaska {
  width: clamp(56px, 8vw, 72px);
  height: clamp(56px, 8vw, 72px);
  background: #FFDC64;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(32px, 5vw, 40px);
  margin: 0 auto clamp(12px, 2vw, 18px);
}
.kv-reg-right-title {
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 700;
  color: #3A4A5E;
  margin: 0 0 clamp(10px, 1.8vw, 16px);
  text-align: center;
  letter-spacing: -0.2px;
}
.kv-reg-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(12px, 2vw, 18px);
}
.kv-reg-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(6px, 1.2vw, 10px) 0;
  border-bottom: 1px solid #F5F7FA;
  font-size: clamp(12px, 1.5vw, 14px);
  color: #3A4A5E;
  font-weight: 500;
  line-height: 1.45;
}
.kv-reg-benefits li:last-child { border-bottom: none; }
.kv-reg-benefits li span {
  font-size: clamp(18px, 2.4vw, 20px);
  flex-shrink: 0;
  width: clamp(24px, 3vw, 28px);
  text-align: center;
  line-height: 1.2;
}
.kv-reg-proof {
  text-align: center;
  font-size: clamp(11px, 1.4vw, 13px);
  color: #7A8A9E;
  padding: clamp(10px, 1.8vw, 12px);
  background: #FFF9F2;
  border-radius: 10px;
  border: 2px solid #FFE8CC;
  margin: 0;
}

/* ============================================
   АДАПТИВ ПО ШИРИНЕ
   ============================================ */

@media (max-width: 900px) {
  .kv-reg {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .kv-reg-left,
  .kv-reg-right {
    padding: 28px 24px;
    min-height: auto;
  }
  .kv-reg-right {
    background: #FFF9F2;
    border-top: 1px solid #F0E8DC;
  }
  .kv-reg-box,
  .kv-reg-right-box {
    max-width: 460px;
  }
}

@media (max-width: 600px) {
  .kv-reg-left { padding: 20px 16px; }
  .kv-reg-right { padding: 20px 16px; }
  .kv-reg-social { gap: 6px; }
  .kv-reg-social-btn {
    padding: 9px 8px;
    font-size: 12px;
    gap: 4px;
  }
  .kv-reg-vaska {
    width: 56px;
    height: 56px;
    font-size: 32px;
    margin-bottom: 12px;
  }
  .kv-reg-right-title { font-size: 15px; }
}

@media (max-width: 380px) {
  .kv-reg-left { padding: 16px 12px; }
  .kv-reg-right { padding: 16px 12px; }
  .kv-reg-social-btn {
    padding: 9px 6px;
    font-size: 11px;
  }
  .kv-reg-social-text { display: none; }
  .kv-reg-social-icon { font-size: 16px; }
  .kv-reg-title { font-size: 19px; }
  .kv-reg-sub { font-size: 12px; }
  .kv-reg-age-options {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .kv-reg-checkbox { font-size: 11px; }
}

/* ============================================
   АДАПТИВ ПО ВЫСОТЕ
   ============================================ */

@media (max-height: 820px) {
  .kv-reg-left,
  .kv-reg-right {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .kv-reg-head { margin-bottom: 10px; }
  .kv-reg-logo { margin-bottom: 6px; }
  .kv-reg-social { margin-bottom: 10px; }
  .kv-reg-divider { margin: 8px 0 6px; }
  .kv-reg-field { margin-bottom: 6px; }
  .kv-reg-field input {
    padding: 10px 14px;
    min-height: 42px;
  }
  .kv-reg-age-label { margin-bottom: 6px; }
  .kv-reg-age-box {
    padding: 8px 6px;
    min-height: 60px;
  }
  .kv-reg-age-emoji { font-size: 20px; }
  .kv-reg-agreements { gap: 6px; margin-bottom: 8px; }
  .kv-reg-right-title { margin-bottom: 8px; }
  .kv-reg-benefits li { padding: 5px 0; }
  .kv-reg-vaska {
    width: 52px;
    height: 52px;
    font-size: 30px;
    margin-bottom: 10px;
  }
}

@media (max-height: 700px) {
  .kv-reg { grid-template-columns: 1fr; }
  .kv-reg-right { display: none; }
  .kv-reg-left {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 14px 20px;
    align-items: flex-start;
  }
  .kv-reg-head {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }
  .kv-reg-logo {
    margin-bottom: 0;
    font-size: 13px;
    flex-shrink: 0;
  }
  .kv-reg-title { font-size: 16px; margin: 0; }
  .kv-reg-sub { display: none; }

  .kv-reg-social {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-bottom: 8px;
  }
  .kv-reg-social-btn {
    padding: 7px 4px;
    min-height: 36px;
    font-size: 11px;
    border-width: 1px;
  }
  .kv-reg-social-text { display: none; }
  .kv-reg-social-icon { font-size: 15px; }
  .kv-reg-social-full { grid-column: auto; }

  .kv-reg-divider { display: none; }
  .kv-reg-form { margin-bottom: 6px; }
  .kv-reg-field { margin-bottom: 5px; }
  .kv-reg-field input {
    padding: 8px 12px;
    min-height: 36px;
  }
  .kv-reg-field-pass input { padding-right: 40px; }
  .kv-reg-pass-toggle {
    min-width: 34px;
    min-height: 34px;
    padding: 6px;
    font-size: 13px;
  }

  .kv-reg-age { margin-bottom: 6px; }
  .kv-reg-age-label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .kv-reg-age-box {
    padding: 5px 4px;
    min-height: 46px;
    flex-direction: row;
    gap: 6px;
  }
  .kv-reg-age-emoji { font-size: 16px; }
  .kv-reg-age-text { font-size: 12px; }

  .kv-reg-agreements {
    gap: 4px;
    margin-bottom: 6px;
  }
  .kv-reg-checkbox {
    font-size: 11px;
    gap: 6px;
  }
  .kv-reg-checkbox input {
    width: 14px;
    height: 14px;
  }

  .kv-reg-submit {
    padding: 9px;
    min-height: 38px;
    font-size: 13px;
  }
  .kv-reg-note { font-size: 10px; margin-top: 4px; }
  .kv-reg-login { font-size: 11px; margin-top: 6px; }
}

@media (max-height: 520px) {
  .kv-reg-left { padding: 8px 14px; }
  .kv-reg-head { margin-bottom: 6px; }
  .kv-reg-logo { font-size: 12px; }
  .kv-reg-title { font-size: 14px; }
  .kv-reg-social {
    gap: 4px;
    margin-bottom: 6px;
  }
  .kv-reg-social-btn {
    padding: 5px 3px;
    min-height: 30px;
  }
  .kv-reg-social-icon { font-size: 13px; }
  .kv-reg-field { margin-bottom: 4px; }
  .kv-reg-field input {
    padding: 6px 10px;
    min-height: 32px;
    border-width: 1px;
  }
  .kv-reg-field-pass input { padding-right: 36px; }
  .kv-reg-pass-toggle {
    min-width: 30px;
    min-height: 30px;
    padding: 4px;
    font-size: 12px;
  }
  .kv-reg-age-label { display: none; }
  .kv-reg-age-box {
    padding: 4px 3px;
    min-height: 38px;
    border-width: 1px;
  }
  .kv-reg-age-emoji { font-size: 14px; }
  .kv-reg-age-text { font-size: 11px; }
  .kv-reg-checkbox {
    font-size: 10px;
    gap: 5px;
  }
  .kv-reg-checkbox input {
    width: 13px;
    height: 13px;
  }
  .kv-reg-checkbox-optional { display: none; }
  .kv-reg-submit {
    padding: 7px;
    min-height: 34px;
    font-size: 12px;
  }
  .kv-reg-note { display: none; }
  .kv-reg-login { font-size: 10px; }
}

@media (max-width: 640px) and (max-height: 640px) {
  .kv-reg { grid-template-columns: 1fr; }
  .kv-reg-right { display: none; }
  .kv-reg-left {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .kv-reg { grid-template-columns: 1fr; }
  .kv-reg-right { display: none; }
}

/* ============================================
   ОСОБЫЕ УСЛОВИЯ
   ============================================ */

@media (min-width: 1440px) {
  .kv-reg-box,
  .kv-reg-right-box {
    max-width: 460px;
  }
}

@media (min-width: 1920px) {
  .kv-reg-left,
  .kv-reg-right {
    padding: 60px 80px;
  }
  .kv-reg-box,
  .kv-reg-right-box {
    max-width: 480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kv-reg * {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  .kv-reg { background: #FAF7F2; }
  .kv-reg-left { background: #F5EFE6; }
  .kv-reg-right { background: #FAF7F2; }
  .kv-reg-social-btn { background: #FFFFFF; }
  .kv-reg-divider span { background: #F5EFE6; }
  .kv-reg-field input { background: #FFFFFF; }
  .kv-reg-age-box { background: #FFFFFF; }
  .kv-reg-age-option input:checked + .kv-reg-age-box { background: #FFF5E8; }
  .kv-reg-proof { background: #F5EFE6; }
}

@media (prefers-contrast: more) {
  .kv-reg-field input { border-color: #7A8A9E; }
  .kv-reg-social-btn { border-color: #7A8A9E; }
  .kv-reg-age-box { border-color: #7A8A9E; }
  .kv-reg-submit { background: #E67A0F; }
}

@supports (padding: max(0px)) {
  .kv-reg-left {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .kv-reg-right {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}