/* =========================
   DEALER REGISTRATION
========================= */

body:has(.reg-hero) .hero-wrapper{ min-height: 0; }

/* Background */
.hero-bg.hero-bg--registration{
  position:absolute;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}

.hero-bg.hero-bg--registration::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height: 30px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.65) 55%,
    #000 100%
  );
  pointer-events:none;
}

.hero-bg.hero-bg--registration img{
  width:100%;
  max-height:100vh;
  object-fit:cover;
}

/* content above bg */
.site-header,
.reg-hero{
  position:relative;
}

/* hero */
.reg-hero{
  min-height:50vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  margin-bottom:40px;
}
.reg-title{
  margin:0;
  font-family:var(--font-heading);
  font-size:60px;
  line-height:1.1;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#fff;
}

/* layout */
.reg-inner{
  max-width:660px;
  margin-inline:auto;
  padding-bottom:40px;
}

.reg-form{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.reg-section-title{
  margin:0;
  font-family:var(--font-heading);
  font-size:20px;
  color:#fff;
  text-align:center;
  opacity:.95;
}
.reg-section-title--no-margin{ margin:0; }

/* grid like */
.reg-grid{
  display: grid;
  grid-template-columns: repeat(2, 300px);
  gap: 20px;
  justify-content: center;
}
.reg-field--full{
  grid-column: 1 / -1;
}


/* =========================
   REG — FORM CONTROLS
========================= */

.reg-field input,
.reg-field select{
  width: 100%;
  height: 52px;
  background:#0f0f0f;
  border:none;
  border-radius:10px;
  padding: 0 16px;
  box-sizing: border-box;
  font-size:16px;
  outline:none;
  color:#a4a4a4;
}

.reg-field input::placeholder{
  color:#777;
}

.reg-field input:not(:placeholder-shown){
  color:#fff;
}

.reg-field select:valid{
  color:#fff;
}


.reg-field input[type="date"]{
  width: 100%;
  height: 52px;
}

/* =========================
   REG — DATE (js-date like Support)
========================= */

.reg-field input.js-date{
  background-image: url('../img/ic.svg');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 52px;
  cursor: pointer;
}


/* select arrow */
.reg-field select{
  appearance:none;
  background-image:url('../img/arrow.svg');
  background-repeat:no-repeat;
  background-position:right 16px center;
  background-size:12px;
  padding-right:44px;
  cursor:pointer;
}

.reg-row--between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:8px;
}

/* checkboxes */
.reg-check{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:#cfcfcf;
  user-select:none;
}
.reg-check input{
  width:14px;
  height:14px;
  accent-color:#4FC2EB;
}
.reg-check--big{
  margin-top:10px;
  font-size:16px;
}
.reg-check a{ color:#4FC2EB; text-decoration:none; }
.reg-check a:hover{ text-decoration:underline; }

/* agreement */
.reg-agreement{
  background:transparent;
  border-radius:10px;
  padding:0;
}
.reg-agreement-lead{
  margin:0 0 10px;
  font-size:16px;
  line-height:1.6;
  color:#cfcfcf;
  text-align:left;
}
.reg-agreement-list{
  margin:0 0 10px;
  padding-left:16px;
  color:#cfcfcf;
  font-size:16px;
  line-height:1.6;
}
.reg-agreement-list a{ color:#4FC2EB; text-decoration:none; }
.reg-agreement-list a:hover{ text-decoration:underline; }

.reg-note{
  margin:4px 0 0;
  font-size:13px;
  color:#9a9a9a;
  line-height:1.5;
}
.reg-note a{ color:#4FC2EB; }
.reg-note a:hover{ color:#fff; }

/* submit */
.reg-actions{
  display:flex;
  justify-content:left;
  margin-top:8px;
}

.reg-submit{
	width: 300px;
    height: 52px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 14px;
    color: #fff;
    background: linear-gradient(90deg, #4FC2EB, #7185C1);
}

.reg-submit[disabled]{ opacity:.6; cursor:not-allowed; }

.reg-msg{
  text-align:center;
  font-size:12px;
  min-height:18px;
  color:#cfcfcf;
}

/* responsive */
@media (max-width:768px){
  .reg-title{ font-size:34px; }
  .reg-grid{ grid-template-columns:1fr; }
  .reg-row--between{ flex-direction:column; align-items:flex-start; }
  .reg-submit{ width:100%; }
  
  .reg-inner {
      padding-bottom: 0;
  }
  
  .reg-hero {
    min-height: 40vh;
    margin-bottom: 0;
}
  body:has(.reg-hero) .hero-wrapper{
    min-height: auto;
  }

  /* контейнер для absolute фону */
  .hero-wrapper{
    position: relative;
  }

  /* фон займає весь hero-wrapper (header + reg-hero) */
  .hero-bg.hero-bg--registration{
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }

  /* головне: не різати 100vh, а розтягнути по контейнеру */
  .hero-bg.hero-bg--registration img{
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  /* контент поверх фону */
  .site-header,
  .reg-hero{
    position: relative;
  }
}


/* =========================
   REG SUCCESS MODAL
========================= */

.reg-modal{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}

.reg-modal.is-open{
  display: block;
}

.reg-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
}

.reg-modal__panel{
  position: relative;
  width: min(520px, calc(100% - 40px));
  margin: 120px auto 0;
  background: rgba(0,0,0,.92);
  border-radius: 10px;
  padding: 48px 28px 42px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  text-align: center;
}

.reg-modal__close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 22px;
  cursor: pointer;
}

.reg-modal__close:hover{
  color: #fff;
}

.reg-modal__icon{
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.reg-modal__title{
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}

.reg-modal__text{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.8);
}

/* lock scroll when modal open */
body.is-modal-open{
  overflow: hidden;
}
