/* ─── Form overlay ─── */
.form-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4vw;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.form-overlay.open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.form-modal {
  background: #0006CF;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem 2.5rem 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 0;
  padding: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}
.form-close:hover { opacity: 1; }

.form-modal-title {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  padding-left: 0;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* ─── Fields ─── */
#escopico-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.form-phone {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1px;
}

#escopico-form input,
#escopico-form textarea,
#escopico-form select {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1.1rem 1rem;
  width: 100%;
  outline: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

#escopico-form select {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='white' stroke-opacity='0.7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

#escopico-form input::placeholder,
#escopico-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#escopico-form select option {
  background: #0006CF;
  color: #fff;
}

#escopico-form input:focus,
#escopico-form textarea:focus,
#escopico-form select:focus {
  background-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: #fff;
}

#escopico-form textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: 1px solid transparent;
  padding: 1rem 1.25rem;
  text-align: center;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  width: 100%;
}
.form-submit:hover {
  background: #fff;
  color: #0006CF;
  border-color: #fff;
}

/* ─── Success ─── */
.form-success {
  display: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 400;
  padding: 2rem 0;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .form-overlay {
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .form-modal {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    justify-content: center;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .form-phone {
    grid-template-columns: 1fr 1.5fr;
  }
}
