/* ======= AUX CONTROL (Simula Placeholder) ======= */
.aux-control {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.aux-control::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
  font-size: 14px;
  font-family: inherit;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 24px);
  line-height: normal;
  transition: opacity 0.2s ease-in-out;
}

.aux-control.has-value::before {
  opacity: 0;
  pointer-events: none;
}

.control-group p:not(.alert) {
  display: none;
}

/* ======= CAMPOS DE FORMULARIO ======= */
.jnilla-contact-form-wrapper input[type="text"],
.jnilla-contact-form-wrapper input[type="email"],
.jnilla-contact-form-wrapper input[type="tel"],
.jnilla-contact-form-wrapper input[type="url"],
.jnilla-contact-form-wrapper input[type="number"],
.jnilla-contact-form-wrapper input[type="date"],
.jnilla-contact-form-wrapper input[type="time"],
.jnilla-contact-form-wrapper input[type="search"],
.jnilla-contact-form-wrapper input[type="password"],
.jnilla-contact-form-wrapper textarea,
.jnilla-contact-form-wrapper select {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  font-family: inherit;
  color: #333;
  min-height: 42px;
}

/* ======= PLACEHOLDER NATIVO ESTILIZADO ======= */
.jnilla-contact-form-wrapper input::placeholder,
.jnilla-contact-form-wrapper textarea::placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
  opacity: 1;
}

/* ======= PLACEHOLDER CROSS-BROWSER ======= */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
}
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
}

/* ======= FOCUS ======= */
.jnilla-contact-form-wrapper input:focus,
.jnilla-contact-form-wrapper textarea:focus,
.jnilla-contact-form-wrapper select:focus {
  border-color: #2684ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(38, 132, 255, 0.2);
}

/* ======= SELECT ======= */
.jnilla-contact-form-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23333' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 35px;
  cursor: pointer;
  color: #999;
}

.jnilla-contact-form-wrapper select:disabled {
  background-color: #f5f5f5;
  border-color: #ddd;
  color: #aaa;
  cursor: not-allowed;
}

.jnilla-contact-form-wrapper select.error {
  border-color: red;
  background-color: #fff0f0;
}

.jnilla-contact-form-wrapper select option[disabled][selected] {
  color: #999;
  display: none;
}

/* ======= FLATPICKR INPUT ======= */
.jnilla-contact-form-wrapper .flatpickr-input {
  background-color: #fff;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
  line-height: 1.4;
  height: auto;
  width: 100%;
  box-sizing: border-box;
  color: #333;
  min-height: 42px;
}

.jnilla-contact-form-wrapper .flatpickr-input::placeholder {
  color: #999;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
}

/* ======= ERRORES ======= */
.jnilla-contact-form-wrapper .error-message {
  color: red;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

/* ======= FLATPICKR ESTILOS ADICIONALES ======= */
.flatpickr-current-month {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow: visible;
  flex-wrap: wrap;
}

.flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
  border-radius: 4px;
  color: #333;
  appearance: none;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
}

.flatpickr-monthDropdown-months {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23333' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 30px;
}

.flatpickr-current-month input.cur-year::-webkit-inner-spin-button,
.flatpickr-current-month input.cur-year::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.flatpickr-weekday {
  font-weight: 600;
  color: #333;
  font-size: 12px;
  text-align: center;
}

.flatpickr-calendar {
  z-index: 9999 !important;
}

.flatpickr-months .flatpickr-month {
  height: 50px !important;
}

/* ======= BOTÓN ======= */
.jnilla-contact-form-wrapper button[type="submit"],
.jnilla-contact-form-wrapper input[type="submit"] {
  background-color: #2684ff;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  width: auto;
  min-height: 42px;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-sizing: border-box;
  display: inline-block;
  text-align: center;
}

.jnilla-contact-form-wrapper button[type="submit"]:hover,
.jnilla-contact-form-wrapper input[type="submit"]:hover {
  background-color: #1a5edb;
  box-shadow: 0 0 8px rgba(38, 132, 255, 0.5);
  outline: none;
}

.jnilla-contact-form-wrapper button[type="submit"]:focus,
.jnilla-contact-form-wrapper input[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.5);
}
