/* YLC Newsletter Signup Styles */
.ylc-newsletter {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 20px;
  margin-bottom: 40px;
  background: #FFFCF9;
  border: 1px solid #DFDFDF;
  border-radius: 16px;
}
.ylc-newsletter *,
.ylc-newsletter *::before,
.ylc-newsletter *::after {
  box-sizing: border-box;
}
.ylc-newsletter-decoration {
  position: absolute;
  top: 8px;
  right: 12px;
  display: block;
  width: 42px;
  height: 42px;
  pointer-events: none;
}
.ylc-newsletter .ylc-newsletter-decoration img {
  display: block;
  width: 42px !important;
  height: 42px !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.ylc-newsletter-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
/* Inside post content the theme sizes h3/p through higher-specificity rules,
   so the card pins its own typography. */
.ylc-newsletter .ylc-newsletter-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Noto Serif JP', Georgia, 'Noto Serif Georgian', serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 26px !important;
  color: #2C2C2C !important;
  text-transform: none !important;
  overflow-wrap: break-word;
}
.ylc-newsletter .ylc-newsletter-desc {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Nunito Sans', Roboto, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  color: #383838 !important;
  overflow-wrap: break-word;
}

/* Fields */
.ylc-newsletter .ylc-newsletter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ylc-newsletter .ylc-newsletter-error {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Roboto', Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  color: #C02839 !important;
}
.ylc-newsletter .ylc-newsletter-error:empty {
  display: none;
}
.ylc-newsletter .ylc-newsletter-field {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  height: 40px !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  background: #FFFFFF;
  border: 1px solid #DBDBDB;
  border-radius: 4px;
}
.ylc-newsletter-field.has-error {
  border-color: #ED1B33;
}
.ylc-newsletter-icon {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 20px;
  height: 20px;
  overflow: hidden;
}
.ylc-newsletter .ylc-newsletter-icon img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 20px !important;
  height: 20px !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* The profile and id glyphs are smaller than their 20px slot in the design */
.ylc-newsletter .ylc-newsletter-icon img.ylc-newsletter-icon-profile {
  top: 2.3333px;
  left: 2.3333px;
  width: 15.3333px !important;
  height: 15.3333px !important;
}
.ylc-newsletter .ylc-newsletter-icon img.ylc-newsletter-icon-id {
  top: 2.4834px;
  left: 1.6495px;
  width: 16.7px !important;
  height: 15.0333px !important;
}
/* The Newspaper theme styles bare input[type=text]/[type=email] (border,
   34px height, 12px font). Reset it inside the card. */
.ylc-newsletter .ylc-newsletter-field input {
  box-sizing: border-box !important;
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  height: 20px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none;
  box-shadow: none !important;
  font-family: 'Roboto', Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  color: #2C2C2C !important;
  -webkit-appearance: none;
  appearance: none;
}
.ylc-newsletter .ylc-newsletter-field input:active,
.ylc-newsletter .ylc-newsletter-field input:focus {
  border: 0 !important;
  box-shadow: none !important;
}
.ylc-newsletter .ylc-newsletter-field input::placeholder {
  color: #6B6B6B !important;
  opacity: 1;
}
.ylc-newsletter-field input[type="number"]::-webkit-outer-spin-button,
.ylc-newsletter-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ylc-newsletter-field input[type="number"] {
  -moz-appearance: textfield;
}

/* Honeypot - hidden from people, reachable by bots */
.ylc-newsletter-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submit */
.ylc-newsletter .ylc-newsletter-submit {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100% !important;
  height: 40px !important;
  min-height: 0 !important;
  padding: 6px 20px !important;
  margin: 0 !important;
  background: #ED1B33 !important;
  border: 2px solid #C02839 !important;
  border-radius: 61px !important;
  box-shadow: none !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background 0.2s;
}
.ylc-newsletter .ylc-newsletter-submit:hover {
  background: #C02839 !important;
}
.ylc-newsletter-submit:focus-visible {
  outline: 2px solid #2C2C2C;
  outline-offset: 2px;
}
.ylc-newsletter-submit[disabled] {
  opacity: 0.7;
  cursor: default;
}

/* Loading: the spinner takes the arrow's 24px slot, so nothing shifts */
.ylc-newsletter .ylc-newsletter-submit.is-loading {
  cursor: wait;
}
.ylc-newsletter .ylc-newsletter-submit.is-loading:hover {
  background: #ED1B33 !important;
}
.ylc-newsletter .ylc-newsletter-submit.is-loading .ylc-newsletter-arrow img {
  display: none;
}
.ylc-newsletter .ylc-newsletter-spinner {
  display: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: ylc-newsletter-spin 0.7s linear infinite;
}
.ylc-newsletter .ylc-newsletter-submit.is-loading .ylc-newsletter-spinner {
  display: block;
}
@keyframes ylc-newsletter-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ylc-newsletter .ylc-newsletter-spinner {
    animation-duration: 2s;
  }
}
.ylc-newsletter .ylc-newsletter-submit-label {
  font-family: 'Roboto', Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 24px !important;
  color: #FFFFFF !important;
  text-align: center;
  white-space: nowrap;
}
.ylc-newsletter-arrow {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.ylc-newsletter-arrow img {
  display: block;
  width: 24px;
  height: 24px;
  transform: rotate(90deg);
}

/* Feedback */
.ylc-newsletter-message {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #383838;
}
.ylc-newsletter-message:empty {
  display: none;
}
.ylc-newsletter-message.is-error {
  color: #C02839;
}

/* Success: the form is replaced by a confirmation panel. These need
   !important because the rules above set display with it too. */
.ylc-newsletter.is-done .ylc-newsletter-title,
.ylc-newsletter.is-done .ylc-newsletter-desc,
.ylc-newsletter.is-done .ylc-newsletter-row,
.ylc-newsletter.is-done .ylc-newsletter-submit,
.ylc-newsletter.is-done .ylc-newsletter-message {
  display: none !important;
}
.ylc-newsletter .ylc-newsletter-success[hidden] {
  display: none !important;
}
.ylc-newsletter .ylc-newsletter-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-align: center;
  animation: ylc-newsletter-fade 0.35s ease-out both;
}
.ylc-newsletter .ylc-newsletter-success-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #ED1B33;
  border-radius: 50%;
}
.ylc-newsletter .ylc-newsletter-success-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Noto Serif JP', Georgia, 'Noto Serif Georgian', serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 26px !important;
  color: #2C2C2C !important;
}
.ylc-newsletter .ylc-newsletter-success-text {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Nunito Sans', Roboto, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  color: #383838 !important;
}
@keyframes ylc-newsletter-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ylc-newsletter .ylc-newsletter-success {
    animation: none;
  }
}
