/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.ecmktoForm * {
  box-sizing: border-box;
}

form.ecmktoForm {
  opacity: 0;
}
form.ecmktoForm.ready {
  opacity: 1;
}

.ecmktoFieldWrap[data-fieldtype='checkboxes-single'] {
  display: block;
  width: 100%;
}

.ecmktoFieldWrap.hidden {
  display: none;
}

.ecmktoFieldWrap label {
  position: relative;
  display: block;
  width: 100%;
  margin: 16px 0 8px 0;
  color: #444;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 1px;
  transition: opacity 2s linear;
}

.ecmktoFieldWrap span.radioLabel,
.ecmktoFieldWrap span.checkboxLabel {
  font-weight: normal;
}

.ecmktoFieldWrap input[type='date'],
.ecmktoFieldWrap input[type='email'],
.ecmktoFieldWrap input[type='number'],
.ecmktoFieldWrap input[type='tel'],
.ecmktoFieldWrap input[type='text'],
.ecmktoFieldWrap input[type='url'],
.ecmktoFieldWrap select,
.ecmktoFieldWrap textarea {
  display: block;
  width: 100%;
  height: 32px;
  padding: 4px;
  background-color: #fff;
  color: #444;
  border: 1px solid #444;
  border-radius: 3px;
}

.ecmktoFieldWrap textarea {
  min-height: calc(3 * 55px);
}

.ecmktoFieldWrap .radioList {
  display: flex;
  flex-direction: column;
}

.ecmktoButtonWrap {
  width: 100%;
  margin-top: 16px;
}

.ecmktoButtonWrap button[type='submit'] {
  padding: 15px 30px;
  border-radius: 4px;
  color: #ffffff;
  font-weight: bold;
  text-transform: uppercase;
  background: #fc7a57;
  border: none;
}

.ecmktoButtonWrap button[type='submit'] {
  cursor: pointer;
}

/* Validation */

.ecmktoForm .ecmktoValidationMessage {
  display: none;
  font-size: 12px;
}

.ecmktoForm .invalid .ecmktoValidationMessage {
  display: block;
}

.ecmktoFieldWrap.invalid input[type='date'],
.ecmktoFieldWrap.invalid input[type='email'],
.ecmktoFieldWrap.invalid input[type='number'],
.ecmktoFieldWrap.invalid input[type='tel'],
.ecmktoFieldWrap.invalid input[type='text'],
.ecmktoFieldWrap.invalid input[type='url'],
.ecmktoFieldWrap.invalid select.mktoField,
.ecmktoFieldWrap.invalid textarea.mktoField {
  border-color: #d74627;
}

@media screen and (min-width: 768px) {
  .ecmktoForm.ecmktoFormColsTwo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    margin: 16px -8px;
  }
  .ecmktoForm.ecmktoFormColsTwo .ecmktoFieldWrap:not(.optInBox) {
    -ms-flex-positive: 1;
    flex-grow: 1;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -ms-flex-preferred-size: calc(50% - 16px);
    flex-basis: calc(50% - 16px);
    padding: 0 8px;
    margin: 0;
  }
  .optInBox,
  .ecmktoButtonWrap {
    padding: 0 8px;
  }
}

.mktoFormWrap {
  container-type: inline-size;
  container-name: mktoFormWrap;
}

/* Stack if displayed in narrow parent on desktop */
@container mktoFormWrap (max-width: 400px) {
  .ecmktoForm.ecmktoFormColsTwo {
    display: block;
  }
  .ecmktoForm.ecmktoFormColsTwo .ecmktoFieldWrap {
    display: block;
  }
}
