/* ===== Form Container ===== */
.form-register {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 40%;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .form-register {
    width: 50%;
  }
}

@media (max-width: 767px) {
  .form-register {
    width: 100%;
  }
}

/* ===== Field Groups ===== */
.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 0;
}

/* ===== Inputs & Select ===== */
.form-field input,
.form-field select {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-primary);
  font-size: 16px;
  color: #333333;
  background-color: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  outline: none;
  transition: box-shadow 0.2s;
}

.form-field input::placeholder {
  color: #999999;
}

.form-field input:focus,
.form-field select:focus {
  box-shadow: 0 0 0 2px var(--color-accent);
}

/* ===== Phone Field with Country Code ===== */
.phone-wrapper {
  display: flex;
  align-items: stretch;
  background-color: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  overflow: hidden;
}

.country-code-wrapper {
  flex-shrink: 0;
}

.country-code-wrapper select {
  background-color: #EBEBEB;
  border: none;
  border-right: 1px solid #E0E0E0;
  border-radius: 0;
  padding: 14px 30px 14px 12px;
  font-size: 15px;
  color: #333333;
  cursor: pointer;
  min-width: 100px;
}

.country-code-wrapper::after {
  border-top-color: #333333;
}

.phone-wrapper input {
  border-radius: 0;
  border: none;
  flex: 1;
}

.phone-wrapper:focus-within {
  box-shadow: 0 0 0 2px var(--color-accent);
}

.phone-wrapper input:focus {
  box-shadow: none;
  border: none;
}

/* ===== Select Wrapper ===== */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #333333;
  pointer-events: none;
}

/* ===== Submit Button ===== */
.btn-submit {
  width: 100%;
  padding: 15px 0;
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 700;
  color: #242424;
  background-color: var(--color-accent);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.8s;
  background-image: linear-gradient(45deg, #B1B1B1, #FFFFFF, #FFFFFF, #B1B1B1);
  background-size: 400% 200%;
  animation: botaoanimado 3.4s cubic-bezier(0.2, 0.5, 0.9, 0.6) 2s infinite;
}

.btn-submit:hover {
  color: var(--color-text);
}

.btn-submit--redirect {
  background-color: var(--color-accent);
  background-image: none;
  animation: none;
  color: #242424;
}

/* ===== Form Messages ===== */
.form-message {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-message--success {
  display: block;
  background-color: rgba(97, 206, 112, 0.15);
  color: var(--color-accent-green);
}

.form-message--error {
  display: block;
  background-color: rgba(207, 46, 46, 0.15);
  color: #cf2e2e;
}

/* ===== Validation ===== */
.form-field input:invalid:not(:placeholder-shown),
.form-field select:invalid:not([data-pristine="true"]) {
  box-shadow: 0 0 0 2px #cf2e2e;
}
