/* Keep the notification card in the existing service grid, after newsletter. */
.fs-account-services-grid > .fs-service-card--notifications { order: 99; }
.fs-service-card--notifications > .fs-product-actions { grid-template-columns: 1fr; }
.fs-service-card--notifications > .fs-product-actions .fs-product-action { max-width: 150px; }
.fs-service-card--notifications > .fs-product-actions #account-notifications-activate-device { max-width: none; }
.fs-service-card--notifications .fs-product-note {
  margin: .6rem 0 0;
  color: var(--acc-muted);
  font-size: .62rem;
  line-height: 1.5;
}
.fs-service-card--notifications [hidden] { display: none !important; }
#account-notifications-device-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .45rem;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin: .75rem 0 0;
  padding: .35rem .65rem;
  border: 1px solid var(--acc-line, #dce5f2);
  border-radius: 999px;
  background: var(--acc-soft, #f4f7fd);
  color: var(--acc-muted, #65738d);
  font-size: .62rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#account-notifications-device-status::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#account-notifications-device-status[data-state="active"] { color: var(--acc-green, #159455); background: var(--acc-green-bg, #e7f7ee); border-color: rgba(21, 148, 85, .25); }
#account-notifications-device-status[data-state="checking"] { color: #1744bd; background: rgba(73, 130, 255, .08); border-color: rgba(73, 130, 255, .25); }
#account-notifications-device-status[data-state="blocked"] { color: #b91c1c; background: rgba(220, 38, 38, .07); border-color: rgba(220, 38, 38, .25); }
#account-notifications-device-status[data-state="unknown"] { color: #92400e; background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .25); }
[data-theme="dark"] #account-notifications-device-status[data-state="checking"] { color: #a8c4ff; }
[data-theme="dark"] #account-notifications-device-status[data-state="blocked"] { color: #fca5a5; }
[data-theme="dark"] #account-notifications-device-status[data-state="unknown"] { color: #fcd34d; }
.fs-notification-label-help { display: inline-flex; align-items: center; gap: .35rem; }
.fs-notification-label-help label { cursor: pointer; }
.fs-notification-help-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--acc-line, #a9c0fa);
  border-radius: 50%;
  background: transparent;
  color: var(--acc-navy, #1744bd);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.fs-notification-help-button:hover, .fs-notification-help-button[aria-expanded="true"] { background: rgba(73, 130, 255, .12); }
.fs-notification-help-button:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }
.fs-notification-help-popup {
  --acc-panel: #fff;
  --acc-navy: #10214a;
  --acc-line: #dce5f2;
  position: fixed;
  z-index: 10001;
  box-sizing: border-box;
  margin: 0;
  padding: 15px 46px 15px 15px;
  border: 1px solid var(--acc-line, #a9c0fa);
  border-left: 3px solid #5b88f5;
  border-radius: 10px;
  background: var(--acc-panel, #fff);
  color: var(--acc-navy, #17213a);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  font-size: .8rem;
  line-height: 1.5;
}
[data-theme="dark"] .fs-notification-help-popup { --acc-panel: #13213a; --acc-navy: #f3f7ff; --acc-line: rgba(148, 163, 184, .3); }
.fs-notification-help-popup[hidden] { display: none !important; }
.fs-notification-help-popup::after { content: ""; position: absolute; left: var(--fs-help-arrow-left); width: 10px; height: 10px; background: var(--acc-panel, #fff); border: solid var(--acc-line, #a9c0fa); transform: translateX(-50%) rotate(45deg); pointer-events: none; }
.fs-notification-help-popup[data-placement="above"]::after { bottom: -6px; border-width: 0 1px 1px 0; }
.fs-notification-help-popup[data-placement="below"]::after { top: -6px; border-width: 1px 0 0 1px; }
.fs-notification-help-body { margin: 0; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.fs-notification-help-close { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 1.5rem; cursor: pointer; }
.fs-notification-help-close:hover { background: rgba(73, 130, 255, .12); }
.fs-notification-help-close:focus-visible { outline: 3px solid #60a5fa; outline-offset: -3px; }

.fs-notification-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 30px;
  margin: .45rem 0 0;
  color: var(--acc-navy);
  font-size: .62rem;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}
.fs-notification-toggle input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 1px solid #b91c1c;
  border-radius: 999px;
  background: #dc2626;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.fs-notification-toggle input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .18s ease;
}
.fs-notification-toggle input:checked { border-color: #15803d; background: #16a34a; }
.fs-notification-toggle input:checked::before { transform: translateX(16px); }
.fs-notification-toggle input:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.fs-notification-toggle input:disabled { opacity: .5; cursor: not-allowed; }

.fs-notification-locale { margin: .8rem 0 .15rem; }
.fs-notification-locale label { display: block; margin-bottom: .35rem; color: var(--acc-navy); font-size: .62rem; font-weight: 700; line-height: 1.5; }
.fs-notification-locale select {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: .45rem 2rem .45rem .7rem;
  border: 1px solid var(--acc-line, #dce5f2);
  border-radius: 9px;
  background: var(--acc-panel, #fff);
  color: var(--acc-navy, #17213a);
  font: inherit;
  font-size: .7rem;
  cursor: pointer;
}
.fs-notification-locale select:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }
.fs-notification-locale select:disabled { opacity: .65; cursor: wait; }
#account-notifications-locale-message { margin: .35rem 0 0; color: var(--acc-muted); font-size: .6rem; line-height: 1.45; }
#account-notifications-locale-message:empty { display: none; }

.fs-notification-cta{position:fixed;z-index:10000;right:1rem;bottom:1rem;display:flex;align-items:center;gap:.75rem;max-width:26rem;padding:1rem;border:1px solid #b9cdf9;border-radius:14px;background:#fff;color:#17213a;box-shadow:0 12px 36px rgba(15,23,42,.22)}
.fs-notification-cta button{border:0;border-radius:9px;padding:.55rem .8rem;cursor:pointer}
.fs-notification-cta button:first-of-type{background:#2447c6;color:#fff;font-weight:700}
.fs-notification-cta button:last-of-type{background:transparent;color:inherit;font-size:1.25rem}
@media(max-width:600px){
  .fs-notification-cta{left:.75rem;right:.75rem;bottom:5rem}
  .fs-service-card--notifications > .fs-product-actions .fs-product-action { max-width: none; }
}
@media(prefers-reduced-motion:reduce){
  .fs-notification-toggle input, .fs-notification-toggle input::before { transition: none; }
}
