/* Deal email choices (email-prefs.js): the topic rows, the switches, the language chips, the opt-in box and the age
   question. Shared by Profile and the email settings page. Light first; the dark values come from company-theme.css,
   which redefines the --ls-* tokens, so nothing here names a dark colour. */

/* Urdu: its own right-to-left run with a font that has the script (localization rule). */
.ls :is(.ep-ur, .ep-optin-ur) { font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; unicode-bidi: isolate; }

/* ---------- the opt-in box ---------- */
.ls .ep-optin { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; align-items: start; cursor: pointer; }
.ls .ep-optin input[type="checkbox"] { width: 28px; height: 28px; min-height: 0; margin: 0; padding: 0; border: 1.5px solid var(--ls-control); border-radius: 8px; background: var(--ls-paper); appearance: none; -webkit-appearance: none; cursor: pointer; }
.ls .ep-optin input[type="checkbox"]:checked { border-color: var(--ls-ink); background: var(--ls-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.ls .ep-optin input:focus-visible { outline: 2px solid var(--ls-accent-text); outline-offset: 3px; }
.ls .ep-optin-copy { display: grid; gap: 4px; min-width: 0; }
.ls .ep-optin-title { color: var(--ls-ink); font-size: 17px; font-weight: 700; line-height: 24px; }
.ls .ep-optin-line { color: var(--ls-soft); font-size: 15px; font-weight: 500; line-height: 22px; }

/* ---------- the age question: two pills, the sign-in steps' year pills ---------- */
.ls .ep-age { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.ls .ep-age.hidden { display: none; }
.ls .ep-age legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; color: var(--ls-ink); font-size: 15px; font-weight: 700; line-height: 22px; }
.ls .ep-age-row { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 120px)); gap: 10px; }
.ls .ep-age-pick { position: relative; display: flex; }
.ls .ep-age-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ls .ep-age-pick span { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ls-control); border-radius: 999px; color: var(--ls-ink); background: var(--ls-paper); font-size: 15px; font-weight: 600; }
.ls .ep-age-pick input:hover + span { border-color: var(--ls-ink); }
.ls .ep-age-pick input:checked + span { border-color: var(--ls-orange); color: #141412; background: var(--ls-orange); font-weight: 700; }
.ls .ep-age-pick input:focus-visible + span { outline: 2px solid var(--ls-accent-text); outline-offset: 3px; }

/* ---------- the topic rows: a tone tile with the topic's drawing, the name, the switch ---------- */
.ls .ep-topics { margin: 0; padding: 0; list-style: none; }
.ls .ep-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; min-height: 68px; padding: 12px 0; --ep-tone: var(--ls-sand); }
.ls .ep-row + .ep-row { border-top: 1px dashed var(--ls-line-2); }
.ls .ep-row[data-topic="weekly_digest"] { --ep-tone: var(--ls-chai); }
.ls .ep-row[data-topic="new_brands"] { --ep-tone: var(--ls-fashion); }
.ls .ep-row[data-topic="saved_ending"] { --ep-tone: var(--ls-move); }
.ls .ep-row[data-topic="campus_deals"] { --ep-tone: var(--ls-study); }
.ls .ep-row[data-topic="announcements"] { --ep-tone: var(--ls-lilac); }
.ls .ep-row[data-topic="partner_offers"] { --ep-tone: var(--ls-food); }
.ls .ep-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ls-ink); background: var(--ep-tone); box-shadow: inset 0 0 0 1px rgba(20, 20, 18, .06); }
.ls .ep-icon svg { display: block; }
.ls .ep-copy { display: grid; gap: 2px; min-width: 0; }
.ls .ep-name { color: var(--ls-ink); font-size: 16px; font-weight: 700; line-height: 22px; cursor: pointer; }
.ls .ep-row .ep-ur { justify-self: start; color: var(--ls-soft); font-size: 14px; line-height: 22px; }
.ls .ep-minor-note { margin: 4px 0 6px; color: var(--ls-soft); font-size: 14px; font-weight: 500; line-height: 20px; }
.ls .ep-minor-note[hidden] { display: none; }
.ls .ep-row.is-locked .ep-name { color: var(--ls-muted); cursor: default; }
.ls .ep-row.is-locked .ep-icon { color: var(--ls-muted); background: var(--ls-canvas); box-shadow: inset 0 0 0 1px var(--ls-line-2); }

/* The switch: off is paper with a grey knob; on is the orange track with an ink outline and a paper knob that carries
   a tick, so on and off differ by more than colour. */
.ls .ep-switch { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 60px; min-height: 44px; }
.ls .ep-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ls .ep-switch input:disabled { cursor: not-allowed; }
.ls .ep-track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--ls-paper); box-shadow: inset 0 0 0 1.5px var(--ls-control); }
.ls .ep-track::after { content: ""; position: absolute; top: 5px; left: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ls-control); }
.ls .ep-switch input:hover + .ep-track { box-shadow: inset 0 0 0 1.5px var(--ls-ink); }
.ls .ep-switch input:checked + .ep-track { background: var(--ls-orange); box-shadow: inset 0 0 0 1.5px var(--ls-ink); }
.ls .ep-switch input:checked + .ep-track::after { top: 3px; left: 3px; width: 24px; height: 24px; transform: translateX(22px); background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 0 1.5px #141412; }
.ls .ep-switch input:focus-visible + .ep-track { outline: 2px solid var(--ls-accent-text); outline-offset: 3px; }
.ls .ep-switch input:disabled + .ep-track { opacity: .45; }
.ls .ep-off .ep-switch input + .ep-track { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .ls .ep-track, .ls .ep-track::after { transition: transform 200ms var(--ls-ease), background-color 160ms var(--ls-ease), box-shadow 160ms var(--ls-ease); }
}

/* ---------- the language choice: the deals page's category chips (the chosen one ink) ---------- */
.ls .ep-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.ls .ep-lang { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; color: var(--ls-ink); background: var(--ls-paper); box-shadow: inset 0 0 0 1.5px var(--ls-control); font-size: 15px; font-weight: 700; cursor: pointer; }
.ls .ep-lang input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ls .ep-lang:hover { box-shadow: inset 0 0 0 1.5px var(--ls-ink); }
.ls .ep-lang:has(input:checked) { color: var(--ls-paper); background: var(--ls-ink); box-shadow: none; }
.ls .ep-lang:has(input:checked) .ep-ur { color: var(--ls-paper); }
.ls .ep-lang:has(input:checked)::before { content: ""; width: 14px; height: 14px; margin-left: -4px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.ls .ep-lang:has(input:focus-visible) { outline: 2px solid var(--ls-accent-text); outline-offset: 3px; }
.ls .ep-lang .ep-ur { font-size: 15px; line-height: 1; }
@media (max-width: 480px) {
  .ls .ep-langs { gap: 6px; }
  .ls .ep-lang { padding: 0 14px; font-size: 14px; }
  .ls .ep-row { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; }
  .ls .ep-icon { width: 40px; height: 40px; border-radius: 11px; }
}
