.rd-mail-choices {
  box-sizing: border-box;
  max-width: 750px;
  margin: 0 auto;
  padding: clamp(10px, 2.5vw, 26px);
  border-radius: 18px;
  background: #f3f0e8;
  color: #273b31;
  font: 16px/1.65 Arial, Helvetica, sans-serif;
}

.rd-mail-choices [hidden] { display: none !important; }
.rd-mail-choices .rd-mail-card {
  padding: clamp(19px, 4.5vw, 38px);
  border: 1px solid #e8e4db;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px #2641340d;
}

.rd-mail-choices h1,
.rd-mail-choices h2 {
  color: #234737;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: normal;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
}

.rd-mail-choices h1 { margin: 0 0 14px; font-size: clamp(26px, 4vw, 30px); }
.rd-mail-choices h2 { margin: 0 0 8px; font-size: clamp(19px, 3vw, 22px); }
.rd-mail-choices p { margin: 0 0 16px; }
.rd-mail-choices .rd-mail-address,
.rd-mail-choices .rd-mail-service {
  padding: 14px 17px;
  border: 1px solid #dce5dc;
  border-radius: 12px;
  background: #eef3ed;
}

.rd-mail-choices .rd-mail-address { overflow-wrap: anywhere; }
.rd-mail-choices .rd-mail-options { margin: 22px 0; }
.rd-mail-choices .rd-mail-options ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e5eae4; }
.rd-mail-choices .rd-mail-options li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #e5eae4;
  overflow-wrap: anywhere;
}

.rd-mail-choices .rd-mail-options small { display: block; color: #526459; font-size: 14px; }
.rd-mail-choices .rd-mail-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 46px;
  width: 146px;
  padding: 5px 8px;
  border: 1px solid #cbd6ce;
  border-radius: 999px;
  background: #f2f5f1;
  color: #273b31;
  font: 600 12px/1.25 Arial, Helvetica, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
}

.rd-mail-choices .rd-mail-switch[aria-checked="true"] { background: #eef3ed; border-color: #c2d4c5; color: #234737; }
.rd-mail-choices .rd-mail-switch[aria-disabled="true"] { opacity: .7; cursor: not-allowed; }
.rd-mail-choices .rd-mail-track {
  box-sizing: border-box;
  width: 48px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: #b5402a;
}

.rd-mail-choices .rd-mail-track::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
}

.rd-mail-choices [aria-checked="true"] .rd-mail-track { background: #2f5a45; }
.rd-mail-choices [aria-checked="true"] .rd-mail-track::before { transform: translateX(20px); }
.rd-mail-choices [data-rdeg-save-status] { min-height: 1.65em; margin: 8px 0; color: #526459; font-size: 14px; }
.rd-mail-choices .rd-mail-service { margin-top: 22px; }
.rd-mail-choices .rd-mail-service p,
.rd-mail-choices .rd-mail-links { margin-bottom: 0; }
.rd-mail-choices .rd-mail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid #e8e4db;
  font-size: 14px;
}

.rd-mail-choices a { color: #2f5a45; text-decoration: underline; text-underline-offset: 2px; }
.rd-mail-choices .rd-mail-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #879e8f;
  border-radius: 999px;
  color: #2f5a45;
  background: #fff;
  font: 600 14px/1.3 Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.rd-mail-choices .rd-mail-home:hover { background: #eef3ed; }
.rd-mail-choices :focus-visible { outline: 2px solid #234737; outline-offset: 3px; }
.rd-mail-choices .rd-mail-home-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 16px 0 0;
}

@media (min-width: 768px) {
  /* WordPress constrained layouts also set max-width on this direct child. */
  .rd-mail-choices[data-rdeg-preferences-url] { max-width: 640px; }

  /* Keep the newsletter headings smaller than the theme's global headings. */
  .rd-mail-choices[data-rdeg-preferences-url] h1 {
    font-size: 38px;
    line-height: 1.2;
  }

  .rd-mail-choices[data-rdeg-preferences-url] h2 {
    font-size: 26px;
    line-height: 1.25;
  }
}

@media (max-width: 420px) {
  .rd-mail-choices .rd-mail-switch { width: 122px; gap: 5px; padding: 4px 6px; font-size: 11px; }
  .rd-mail-choices .rd-mail-options li { font-size: 14px; }
}

body.rdeg-newsletter-confirmation {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  padding: clamp(28px, 9vh, 96px) 16px;
  background: #f3f0e8;
}

.rdeg-newsletter-confirmation .rd-mail-choices {
  max-width: 600px;
  padding: 0;
}

.rdeg-newsletter-confirmation .rd-mail-card { border-top: 4px solid #b5402a; }
.rdeg-newsletter-confirmation .rdeg-confirmation-brand {
  margin-bottom: 10px;
  color: #894535;
  font-size: 14px;
  font-weight: 600;
}

.rdeg-newsletter-confirmation .rd-mail-choices h1 {
  font-size: clamp(27px, 5vw, 36px);
}

.rdeg-newsletter-confirmation .rdeg-confirmation-submit {
  border-color: #2f5a45;
  background: #2f5a45;
  color: white;
  cursor: pointer;
}

.rdeg-newsletter-confirmation .rdeg-confirmation-submit:hover { background: #234737; }
