/* Speaking page — Contact Form 7 UX fixes */

.ym-speaking-form-card .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.ym-speaking-form-card input,
.ym-speaking-form-card textarea,
.ym-speaking-form-card select {
  box-sizing: border-box;
}

.ym-speaking-form-card input.wpcf7-not-valid,
.ym-speaking-form-card textarea.wpcf7-not-valid,
.ym-speaking-form-card select.wpcf7-not-valid {
  border-color: #b84538;
  box-shadow: 0 0 0 1px rgba(184, 69, 56, 0.22);
}

.ym-speaking-form-card .wpcf7-not-valid-tip {
  display: block;
  margin: 8px 0 0;
  color: #b84538;
  font-size: 14px;
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ym-speaking-form-card .ym-speaking-form__privacy,
.ym-speaking-form-card .ym-speaking-form__field--privacy {
  width: 100%;
  max-width: 860px;
  margin: 24px 0 0;
  padding: 0;
  display: block !important;
  grid-column: 1 / -1;
  min-width: 0;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-form-control-wrap,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-form-control-wrap,
.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-form-control,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-form-control,
.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  overflow: visible !important;
}

.ym-speaking-form-card .ym-speaking-form__privacy label,
.ym-speaking-form-card .ym-speaking-form__field--privacy label {
  position: relative;
  display: block !important;
  width: 100% !important;
  max-width: 760px !important;
  height: auto !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  overflow: visible !important;
}

.ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"],
.ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"] {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 2;
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label,
.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label span,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label span,
.ym-speaking-form-card .ym-speaking-form__privacy-text {
  position: relative !important;
  display: block !important;
  width: auto !important;
  max-width: 760px !important;
  height: auto !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 1px 0 0 42px !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  color: rgba(17, 17, 17, 0.76) !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em;
  text-align: left !important;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::after,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::before {
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(32, 60, 82, 0.58);
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::after,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::after {
  left: 9px;
  top: 6px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(45deg) scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"]:checked + .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
  border-color: var(--ym-color-blue, #203c52);
  background: var(--ym-color-blue, #203c52);
  box-shadow: 0 6px 18px rgba(32, 60, 82, 0.14);
}

.ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"]:checked + .wpcf7-list-item-label::after,
.ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"]:focus-visible + .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"]:focus-visible + .wpcf7-list-item-label::before {
  box-shadow: 0 0 0 4px rgba(32, 60, 82, 0.16);
}

.ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"].wpcf7-not-valid + .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"].wpcf7-not-valid + .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-not-valid input[type="checkbox"] + .wpcf7-list-item-label::before,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-not-valid input[type="checkbox"] + .wpcf7-list-item-label::before {
  border-color: #b84538;
  box-shadow: 0 0 0 3px rgba(184, 69, 56, 0.14);
}

.ym-speaking-form-card .ym-speaking-form__privacy a,
.ym-speaking-form-card .ym-speaking-form__field--privacy a,
.ym-speaking-form-card .ym-speaking-form__privacy-text a {
  color: var(--ym-color-blue, #203c52) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.ym-speaking-form-card .ym-speaking-form__privacy a:hover,
.ym-speaking-form-card .ym-speaking-form__field--privacy a:hover,
.ym-speaking-form-card .ym-speaking-form__privacy-text a:hover {
  opacity: 0.72;
}

.ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-not-valid-tip,
.ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-not-valid-tip {
  display: block;
  width: 100%;
  margin: 9px 0 0 42px;
  color: #b84538;
  font-size: 13px;
  line-height: 1.35;
}

.ym-speaking-form-card .ym-speaking-form__submit-wrap {
  margin-top: 32px;
}

.ym-speaking-form-card .wpcf7-response-output {
  margin: 22px 0 0;
}

@media (max-width: 767px) {
  .ym-speaking-form-card .ym-speaking-form__privacy,
  .ym-speaking-form-card .ym-speaking-form__field--privacy {
    margin-top: 20px;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy label,
  .ym-speaking-form-card .ym-speaking-form__field--privacy label {
    max-width: 100% !important;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy input[type="checkbox"],
  .ym-speaking-form-card .ym-speaking-form__field--privacy input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label,
  .ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label,
  .ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label span,
  .ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label span,
  .ym-speaking-form-card .ym-speaking-form__privacy-text {
    max-width: 100% !important;
    min-height: 24px !important;
    padding-left: 38px !important;
    font-size: 14px !important;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::before,
  .ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::before {
    width: 24px;
    height: 24px;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-list-item-label::after,
  .ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-list-item-label::after {
    left: 8px;
    top: 6px;
  }

  .ym-speaking-form-card .ym-speaking-form__privacy .wpcf7-not-valid-tip,
  .ym-speaking-form-card .ym-speaking-form__field--privacy .wpcf7-not-valid-tip {
    margin-left: 38px;
    font-size: 13px;
  }

  .ym-speaking-form-card .wpcf7-not-valid-tip {
    font-size: 13px;
  }
}

.ym-cf7-tracking-fields {
  display: none !important;
}


.ym-cf7-antispam-fields {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.ym-cf7-antispam-fields .wpcf7-form-control-wrap,
.ym-cf7-antispam-fields input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.ym-speaking-form-card input:not([type="hidden"]):not([type="submit"]),
.ym-speaking-form-card textarea,
.ym-speaking-form-card select {
  max-width: 100%;
}

@media (max-width: 767px) {
  .ym-speaking-form-card input:not([type="hidden"]):not([type="submit"]),
  .ym-speaking-form-card textarea,
  .ym-speaking-form-card select {
    font-size: 16px !important;
    line-height: 1.25 !important;
    -webkit-text-size-adjust: 100%;
  }
}


/* iOS date field: visible placeholder + sane native date rendering */
.ym-speaking-form-card .ym-speaking-form__field--date {
  position: relative;
}

.ym-speaking-form-card .ym-speaking-form__field--date .wpcf7-form-control-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.ym-speaking-form-card .ym-speaking-form__date-placeholder {
  position: absolute;
  left: clamp(16px, 1.04vw, 20px);
  top: 50%;
  z-index: 3;
  display: block;
  max-width: calc(100% - 54px);
  color: rgba(5, 5, 5, 0.58);
  font-family: inherit;
  font-size: var(--ym-font-size-body, 18px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  pointer-events: none;
}

.ym-speaking-form-card .ym-speaking-form__field--date.is-filled .ym-speaking-form__date-placeholder {
  display: none;
}

.ym-speaking-form-card .ym-speaking-form__field--date input[type="date"] {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: left !important;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: light;
}

.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"] {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: transparent !important;
}

.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit,
.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit-text,
.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit-month-field,
.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit-day-field,
.ym-speaking-form-card .ym-speaking-form__field--date.is-empty input[type="date"]::-webkit-datetime-edit-year-field {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.ym-speaking-form-card .ym-speaking-form__field--date.is-filled input[type="date"] {
  color: var(--ym-color-ink, #07142f) !important;
  -webkit-text-fill-color: var(--ym-color-ink, #07142f) !important;
  caret-color: auto !important;
}

.ym-speaking-form-card .ym-speaking-form__field--date input[type="date"]::-webkit-date-and-time-value {
  display: block;
  width: 100%;
  min-height: 1.2em;
  margin: 0;
  padding: 0;
  text-align: left !important;
}

.ym-speaking-form-card .ym-speaking-form__field--date input[type="date"]::-webkit-datetime-edit {
  padding: 0 !important;
  text-align: left !important;
}

.ym-speaking-form-card .ym-speaking-form__field--date input[type="date"]::-webkit-calendar-picker-indicator {
  width: 42px;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.ym-speaking-form-card .ym-speaking-form__field--date::after {
  content: "";
  position: absolute;
  right: clamp(13px, 0.95vw, 18px);
  top: 50%;
  z-index: 2;
  width: clamp(14px, 0.94vw, 18px);
  height: clamp(14px, 0.94vw, 18px);
  background: url("../icons/calendar.svg") center / contain no-repeat;
  opacity: 0.7;
  transform: translateY(-50%);
  pointer-events: none;
}

@media (max-width: 767px) {
  .ym-speaking-form-card .ym-speaking-form__date-placeholder {
    left: 16px;
    max-width: calc(100% - 52px);
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .ym-speaking-form-card .ym-speaking-form__field--date input[type="date"] {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 48px 0 16px !important;
    font-size: 16px !important;
    line-height: 48px !important;
  }

  .ym-speaking-form-card .ym-speaking-form__field--date input[type="date"]::-webkit-date-and-time-value {
    min-height: 48px;
    line-height: 48px;
  }

  .ym-speaking-form-card .ym-speaking-form__field--date::after {
    right: 16px;
    width: 16px;
    height: 16px;
  }
}
