/* =========================================
Materialize Base Sizes
Materialize 2 draws its parts in the newer Material look. These rules keep
the sizes and spacing the site was designed with. Colours live in the
theme files.
========================================= */
html {
  line-height: 1.5;
}

ul:not(.browser-default) {
  padding-left: 0;
  list-style-type: none;
}

button {
  cursor: pointer;
}

/* Columns are spaced by their own padding, not by a grid gap. */
.row {
  gap: 0;
  margin-bottom: 20px;
}

.row .col {
  padding: 0 0.75rem;
}

/* Anything in a row that is not a column, such as a footer, spans it. */
.row>:not(.col) {
  grid-column: 1 / -1;
}

.col .row {
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.waves-effect {
  position: relative;
  overflow: hidden;
  z-index: 1;
  user-select: none;
  vertical-align: middle;
}

.btn,
.btn-flat {
  display: inline-block;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 400;
  line-height: 36px;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: normal;
}

.btn,
.btn-small {
  letter-spacing: 0.5px;
}

.btn-small {
  height: 32.4px;
  font-size: 13px;
  line-height: 32.4px;
}

.btn i,
.btn-flat i {
  font-size: 1.3rem;
  line-height: inherit;
}

.btn-small i {
  font-size: 1.2rem;
}

.btn {
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
}

.btn:hover {
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
}

table thead {
  color: inherit;
}

.card-panel {
  margin: 0.5rem 0 1rem;
}

.btn:disabled,
.btn-flat:disabled {
  box-shadow: none;
  cursor: default;
}

input:not([type]),
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=number],
input[type=search] {
  font-size: 16px;
}

/* Fields are underlined, with the label resting in the field until it has
   focus or a value. A field with no placeholder needs placeholder=" " for
   its label to rest in it. */
.input-field input {
  box-sizing: content-box;
  width: 100%;
  height: 3rem;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
  border-radius: 0;
  outline: none;
  background-color: transparent;
  box-shadow: none;
}

.input-field input:focus:not([readonly]) {
  padding-top: 0;
  border-bottom-width: 1px;
  box-shadow: 0 1px 0 0 var(--md-sys-color-primary);
}

.input-field>label {
  top: 0;
  left: 0;
  font-size: 1rem;
  transform: translateY(12px);
  transform-origin: 0 100%;
}

.input-field.col>label {
  left: 0.75rem;
}

.input-field input:focus:not([readonly])+label,
.input-field input:not([placeholder=" "])+label,
.input-field input:not(:placeholder-shown)+label {
  top: 0;
  transform: translateY(-14px) scale(0.8);
  transform-origin: 0 0;
}

/* Materialize places its menus with CSS anchor positioning, but sets their
   top edge to a value browsers reject. A menu opens under its field, and a
   select's menu opens over it. */
.dropdown-content[popover] {
  top: anchor(bottom);
  right: auto;
  bottom: auto;
  padding: 0;
}

.select-dropdown.dropdown-content[popover] {
  top: anchor(top);
}

.dropdown-content li {
  min-height: 50px;
  line-height: 1.5rem;
  cursor: pointer;
}

.dropdown-content li:focus-within,
.dropdown-content li.active {
  background-color: transparent;
}

.dropdown-content li>span {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 22px;
}

.chip {
  display: inline-block;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 32px;
  vertical-align: baseline;
  white-space: normal;
}

/* =========================================
1. Support Banner
========================================= */
.support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  gap: 0.75rem;
}

.support-banner a {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.support-banner a:hover {
  text-decoration: underline;
}

.support-banner-icon {
  font-size: 1rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* Outweighs the theme's i.material-icons color rule */
i.material-icons.support-banner-icon {
  color: #e04c4c;
}

.support-banner-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  flex-shrink: 0;
}

.support-banner-close:hover {
  opacity: 1;
}

.support-banner-close .material-icons {
  font-size: 1.1rem;
  vertical-align: middle;
}

.material-tooltip[popover] {
  max-width: min(22rem, calc(100vw - 1rem));
  min-height: 0;
  margin: 16px 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.45rem;
  background-color: #292d35;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.28);
  color: #f5f6f8;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.material-tooltip[popover][data-position=left],
.material-tooltip[popover][data-position=right] {
  margin: 0 10px;
}

/* A popup fills the window unless told otherwise, so the edge away from the
   element is let go; without this a tooltip on the left (Logout) opens at the
   far left of the page. One without room on its side flips to the other. */
.material-tooltip[popover][data-position=top] {
  top: auto;
  position-try-fallbacks: flip-block;
}

.material-tooltip[popover][data-position=bottom] {
  bottom: auto;
  position-try-fallbacks: flip-block;
}

.material-tooltip[popover][data-position=left] {
  left: auto;
  position-try-fallbacks: flip-inline;
}

.material-tooltip[popover][data-position=right] {
  right: auto;
  position-try-fallbacks: flip-inline;
}

/* =========================================
2. Main Layout & Navigation
========================================= */
.main-layout {
  width: 100%;
  min-width: 0;
  margin-top: 0.5rem;
  margin-right: 0;
  margin-left: 0;
}

.main-layout>.col,
.main-content,
.main-content>.section {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* =========================================
Side Nav (replaces legacy Materialize collection sidebar)
========================================= */

/* Stack the groups with consistent gaps */
.side-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* padding slightly inside the column */
  padding-right: 0.25rem;
}

.side-nav-group {
  display: block;
  height: auto;
  line-height: normal;
  min-height: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.6rem;
  /* border + background colours come from theme */
}

.side-nav-label {
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.1;
  margin: 0.08rem 0 0.18rem;
  padding: 0 0.15rem;
  opacity: 0.72;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.4rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
  /* border-top separator (theme overrides the colour) */
  border-top: 1px solid transparent;
  line-height: 1.25;
  box-sizing: border-box;
}

.side-nav-item:first-child {
  border-top: none;
}

/* SVG icon wrapper */
.menu-icon,
.topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.menu-icon svg,
.topbar-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.menu-icon img,
.topbar-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Heart icon uses fill rather than stroke */
.menu-icon--heart svg {
  fill: currentColor;
  stroke: none;
}

/* Accent-coloured icon modifiers — colour tokens set per-theme */
.menu-icon--accent {
  color: var(--menu-icon-accent, currentColor);
}

.menu-icon--coffee {
  color: var(--menu-icon-coffee, currentColor);
}

.menu-icon--heart {
  color: var(--menu-icon-heart, currentColor);
}

.mobile-menu-tab,
.mobile-menu-drawer-heading {
  display: none;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.56);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

@media (max-width: 1000px) {
  .main-layout {
    display: block;
    align-items: flex-start;
  }

  .main-layout .side-menu {
    display: flex !important;
    order: 0;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    margin-top: 0.55rem;
    margin-bottom: 0.7rem;
    padding-right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.22rem;
    justify-content: flex-start;
    align-items: center;
  }

  .main-layout .main-content {
    order: 1;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
  }

  .side-nav-label,
  .side-nav-item .side-nav-text {
    display: none !important;
  }

  .side-nav-group {
    display: flex;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin-bottom: 0;
    gap: 0;
    border-radius: 0.56rem;
    overflow: hidden;
  }

  .side-nav-group+.side-nav-group {
    margin-left: 0.2rem;
    padding-left: 0.22rem;
    border-left: 1px solid rgba(128, 136, 150, 0.3);
  }

  .side-nav-item {
    justify-content: center;
    gap: 0;
    width: 3rem;
    min-width: 2.6rem;
    flex: 1 1 3rem;
    min-height: 4.00rem;
    padding: 0.42rem 0.3rem;
    border-top: none;
  }

  .side-nav-item+.side-nav-item {
    border-left: 1px solid rgba(128, 136, 150, 0.14);
  }

  .side-nav-item .menu-icon {
    width: 1.38rem;
    height: 1.38rem;
  }

  .side-nav-item .menu-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 600px) {
  .mobile-menu-tab {
    position: fixed;
    top: 38vh;
    left: -1px;
    z-index: 1099;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 12.6rem;
    padding: 0;
    border: 1px solid;
    border-left: 0;
    border-radius: 0 0.65rem 0.65rem 0;
    font: inherit;
    cursor: pointer;
    opacity: 0.88;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0.25rem 0 0.8rem rgba(0, 0, 0, 0.2);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .mobile-menu-tab:hover,
  .mobile-menu-tab:focus,
  .mobile-menu-tab:active,
  .mobile-menu-tab:focus-visible {
    opacity: 0.88;
    transform: none;
  }

  .mobile-menu-tab i {
    font-size: 1.2rem;
  }

  .mobile-menu-drawer-heading {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid;
    font-size: 1.05rem;
  }

  .main-layout .side-menu {
    position: fixed;
    top: 0;
    right: auto !important;
    bottom: 0;
    left: 0 !important;
    z-index: 1101;
    display: block !important;
    width: min(20rem, 88vw) !important;
    max-width: min(20rem, 88vw) !important;
    height: 100dvh;
    margin: 0;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    transform: translateX(-105%);
    box-shadow: 0.6rem 0 1.8rem rgba(0, 0, 0, 0.28);
  }

  /* Slide only when opened or closed, not when the window is resized. */
  .mobile-menu-animate .main-layout .side-menu {
    transition: transform 0.22s ease;
  }

  .mobile-menu-open {
    overflow: hidden;
  }

  .mobile-menu-open .main-layout .side-menu {
    transform: translateX(0);
  }

  .mobile-menu-open .mobile-menu-tab {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-field-focus .mobile-menu-tab {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
  }

  body.swal2-shown:not(.swal2-toast-shown) .mobile-menu-tab,
  body:has(.apprise-dialog[open]) .mobile-menu-tab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
  }

  .mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-layout .side-nav-label,
  .main-layout .side-nav-item .side-nav-text {
    display: block !important;
  }

  .main-layout .side-nav-group {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0.55rem;
  }

  .main-layout .side-nav-group+.side-nav-group {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .main-layout .side-nav-item {
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    min-height: 2.8rem;
    padding: 0.65rem 0.8rem;
    border-left: 0;
    border-top: 1px solid rgba(128, 136, 150, 0.14);
  }

  .main-layout .side-nav-item:first-child {
    border-top: 0;
  }

  .main-layout .side-nav-item .menu-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .mobile-menu-tab,
  .mobile-menu-backdrop,
  .mobile-menu-animate .main-layout .side-menu,
  .reset-configuration-toggle,
  .reset-configuration-toggle__track,
  .reset-configuration-toggle__track>span {
    transition: none;
  }
}

/* Keep the logo and API version together in LTR and RTL layouts. */
.nav-brand {
  float: left;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.3rem;
  direction: ltr;
}

.nav-brand-link {
  display: block;
  flex: 0 0 auto;
}

.nav-brand .apprise-logo {
  float: none !important;
}

.nav-api-version {
  flex: 0 0 auto;
  margin-top: 0.28rem;
  line-height: 1;
  white-space: nowrap;
}

.nav ul li {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav ul {
  float: right;
  /* Keep control order stable; dir="auto" handles translated labels. */
  direction: ltr;
  font-style: normal;
  margin: 0;
  padding: 0.18rem 0 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Apprise Library text – tight to the top-right */
.nav ul li.library-language-nav {
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.nav ul li .apprise-lib-ver {
  line-height: 1.15;
  margin-top: 0;
}

.nav ul .api-status-nav,
.nav ul li .apprise-lib-ver {
  font-size: 0.75rem;
}

.nav ul .api-status-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  line-height: 1.1;
  margin-top: 0.18rem;
}

/* Social + theme icon row in the nav */
li.auth-health-nav,
li.social-theme-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  row-gap: 0.3rem;
  margin-top: 0.3rem;
  max-width: 100%;
}

li.auth-health-nav {
  margin-top: 0.18rem;
}

li.social-theme-nav>a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

li.social-theme-nav>a:hover {
  opacity: 1;
}

li.social-theme-nav .topbar-icon {
  width: 1.15rem;
  height: 1.15rem;
}

li.social-theme-nav .topbar-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  fill: currentColor;
  stroke: none;
}

/* The mobile handset is a stroke icon; do not apply the filled social-icon style. */
li.social-theme-nav .topbar-icon--mobile svg {
  fill: none;
  stroke: currentColor;
}

.auth-account,
.auth-logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.1;
  text-decoration: none;
}

.auth-logout-link {
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

/* Materialize gives every focused button a teal fill. Keep transparent header
   controls visually unchanged after pointer activation. */
.auth-logout-link:hover,
.auth-logout-link:focus,
.auth-logout-link:active,
li.social-theme-nav>a:focus:not(:focus-visible),
.auth-account:focus:not(:focus-visible) {
  outline: none;
  background-color: transparent !important;
  box-shadow: none !important;
}

.auth-logout-link:focus-visible,
li.social-theme-nav>a:focus-visible,
.auth-account:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  background-color: transparent !important;
  box-shadow: none !important;
}

.auth-logout-form {
  display: inline-flex;
  margin: 0;
}

.language-selector-form,
.language-selector-label {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.language-selector-label {
  position: relative;
}

.language-selector-label::after {
  position: absolute;
  inset-inline-end: 0.5rem;
  width: 0.34rem;
  height: 0.34rem;
  border-right: 1.5px solid var(--select-caret);
  border-bottom: 1.5px solid var(--select-caret);
  content: "";
  pointer-events: none;
  transform: translateY(-0.12rem) rotate(45deg);
}

.language-selector {
  display: block;
  width: 3.25rem;
  height: 1.7rem;
  margin: 0;
  padding-block: 0;
  padding-inline: 0.45rem 1.15rem;
  border: 1px solid var(--select-border);
  border-radius: 0.42rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--select-bg);
  color: var(--select-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.language-selector:hover {
  border-color: var(--select-border-hover);
}

.language-selector:focus-visible {
  border-color: var(--mobile-app-accent);
  box-shadow: 0 0 0 3px var(--select-focus-ring);
}

.language-selector-submit {
  min-width: 0;
  height: 1.7rem;
  margin-left: 0.25rem;
  padding: 0 0.45rem;
  border: 1px solid var(--select-border);
  border-radius: 0.42rem;
  background-color: var(--select-bg);
  color: var(--select-text);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-session-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.auth-account-icon,
.auth-logout-icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
}

.auth-account-icon svg,
.auth-logout-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-account-name {
  max-width: min(12rem, 36vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Handle cases when a long account name pushes the logo in a
   weird way that breaks the layout; this is  small fix to push
   the line containing hte username to not interfere with the logo
   when realestate is limited */
@media (max-width: 600px) {
  .nav .apprise-logo {
    height: 3.5em;
  }

  li.social-theme-nav {
    gap: 0.22rem;
  }

  .language-selector {
    width: 3rem;
  }

  .nav ul li.library-language-nav {
    gap: 0.22rem;
  }

  .auth-session-nav {
    gap: 0.22rem;
  }

  .auth-account-name {
    max-width: 5.5rem;
  }
}

@media (max-width: 480px) {
  .nav .apprise-logo {
    height: 2.75em;
  }

  .auth-account-name {
    display: none;
  }
}

@media (max-width: 360px) {
  .apprise-lib-label {
    display: none;
  }
}

.logout-confirm-icon {
  display: inline-flex;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0.25rem auto 0.5rem;
}

.logout-confirm-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-disabled-page {
  max-width: 40rem;
  margin: 3rem auto;
}

.auth-disabled-card {
  padding: 2.5rem 2rem;
  border: 1px solid;
  border-radius: 1.4rem;
}

.auth-disabled-icon {
  display: inline-flex;
  width: 8rem;
  height: 8rem;
}

.auth-disabled-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-disabled-card h4 {
  margin: 0.75rem 0 0.5rem;
}

.auth-disabled-card p {
  margin: 0;
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 1.1rem;
  background: currentColor;
  opacity: 0.2;
  margin: 0 0.1rem;
}

.nav ul i {
  font-size: 2.0rem;
}

.error-page {
  font-weight: bold;
}

.error-page h1 {
  font-size: 5em;
  font-weight: inherit;
}

.error-page i {
  color: inherit !important;
}

.error-page i.spotlight {
  font-size: 10em;
}

.error-page pre code i {
  /* Better alignment */
  margin: -0.3em .5em 0 0;
}

.apprise-logo {
  max-width: 100%;
  display: block;
  height: 5em;
  width: auto;
}

.apprise-mini-logo {
  max-width: 100%;
  display: inline-flex;
  flex-shrink: 0;
  height: 1.0rem;
  width: 1.0rem;
  margin-right: 0.16rem;
}


a.apprise-api-ver,
a.apprise-lib-ver {
  color: inherit;
  text-decoration: none;
}

a.apprise-lib-ver {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.06rem;
}

.page-footer-legal {
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.8;
}

.page-footer-legal a {
  text-decoration: none;
}

.page-footer-legal a:hover {
  text-decoration: underline;
}

/* =========================================
2. Global Typography & Elements
========================================= */
input {
  display: block;
}

code {
  font-family: monospace;
  white-space: normal;
  padding: 0.2rem;
  border-radius: 4px;
}

/* URLs, paths and code samples are always read left to right. Isolating them
   keeps a leading slash at the front of /notify/KEY on a right-to-left page
   instead of letting the browser move it to the end. Message fields are left
   out on purpose; those hold whatever language the person is writing in. */
code,
pre,
kbd,
samp,
.apprise-config-editor textarea {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Inside <pre>, preserve newlines that hljs injects when converting <br> tags */
pre code {
  white-space: pre;
}

h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
}

h4 {
  margin-bottom: 0.75rem;
}

h6 {
  font-weight: bold;
}

/* Specific H4 fix for welcome/details pages */
h4 em {
  font-size: 2.0rem;
  display: inline-block;
  margin: 0;
  padding: 0;
  word-break: break-all;
  line-height: 1.0em;
  font-style: normal;
  font-weight: bold;
}

td,
th {
  vertical-align: top;
  padding-top: 0;
}

textarea {
  height: 16rem;
  font-family: monospace;
}

.material-icons {
  display: inline-flex;
  vertical-align: middle;
}

/* =========================================
3. Page Specific: Welcome & Details
========================================= */
.api-welcome {
  margin-top: 0.5rem;
}

.api-welcome .section {
  max-width: 80rem;
}

.api-welcome .table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.api-welcome .table-wrapper>table {
  table-layout: fixed;
}

.api-welcome .table-wrapper>table>thead>tr>th:first-child {
  width: 18%;
}

.api-welcome .table-wrapper>table>tbody>tr>td {
  min-width: 0;
  overflow: hidden;
}

.api-welcome pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.api-details {
  margin-top: 0.5rem;
}

.api-details .details-header p {
  max-width: 70rem;
}

/* The service listing card takes two thirds of the row, the plugin count one third. */
.details-overview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin: 0.75rem 0 1.25rem;
}

.details-overview .notify-form-section {
  margin: 0;
}

.details-overview .notify-section-heading {
  margin-bottom: 0;
}

/* The switch is followed by its own label here. */
.review-selected-filter.details-show-all {
  width: auto;
  gap: 0.5rem;
  white-space: nowrap;
}

.details-summary .notify-section-heading {
  height: 100%;
}

.details-summary-count {
  color: var(--mobile-app-accent);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

@media (max-width: 600px) {
  .details-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A search box that filters a list; its clear button stands in for the browser's own. */
.list-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.list-search-clear.btn-flat[hidden],
.list-search-more[hidden],
.list-search-hidden {
  display: none !important;
}

/* Show More sits centred under its list. */
.list-search-more-row {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 1rem;
}

.list-search-more.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.list-search-more-count {
  opacity: 0.75;
}

.api-details .collapsible {
  box-shadow: none;
  border: none;
  margin: 0.75rem 0 1rem;
}

.api-details .collapsible>li {
  border-radius: 0.45rem;
  overflow: hidden;
  margin-bottom: 0.35rem;
  box-shadow: none;
  border: 1px solid;
}

.api-details .collapsible>li:last-child {
  margin-bottom: 0;
}

.api-details .collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1rem 0.62rem 0.85rem;
  font-weight: 500;
  font-size: 0.94rem;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-bottom: none;
}




/* Apprise API status indicator */
.api-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.3rem;
  font-size: 1.1rem;
  line-height: 1;
}

/* Loading spinner */
.api-status-icon.status-loading {
  animation: api-spin 1s linear infinite;
}

.status-icon-stack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.12rem;
  height: 1.12rem;
  margin-left: 0.3rem;
  font-size: 0;
}

.status-icon-stack.status-loading {
  animation: none;
}

.status-icon-stack .status-icon {
  display: none;
  width: 100%;
  height: 100%;
}

.status-icon-stack .status-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.status-icon-stack.status-loading .status-icon-loading,
.status-icon-stack.status-ok .status-icon-ok,
.status-icon-stack.status-error .status-icon-error,
.status-icon-stack.status-disabled .status-icon-disabled {
  display: inline-flex;
}

.status-icon-stack.status-loading .status-icon-loading svg {
  animation: api-spin 1s linear infinite;
}

.topbar-status-icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0;
}

/* Error details text under the line */
.api-status-details {
  margin-left: 1.8rem;
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.api-status-nav #nav-api-status-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
}

#theme-toggle .topbar-icon svg {
  transform: translateX(0.03rem);
}

/* Shared modal shell. Native dialogs and SweetAlert popups use the same frame. */
.apprise-dialog,
.swal2-popup.apprise-popup {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--dialog-border);
  border-radius: 0.8rem;
  color: var(--dialog-text);
  background: var(--dialog-surface);
  box-shadow: 0 1.25rem 4rem var(--dialog-shadow);
}

.apprise-dialog::backdrop,
.swal2-container.swal2-backdrop-show {
  background: rgba(5, 8, 10, 0.7);
  backdrop-filter: blur(2px);
}

/* A toast is a small notice, not a dialog, so nothing behind it is dimmed or blurred. */
.swal2-container:has(.swal2-toast),
body.swal2-toast-shown .swal2-container {
  background: transparent !important;
  backdrop-filter: none !important;
}

/* Compact status notices stay centered and use the same shape in every view. */
.swal2-popup.swal2-toast.apprise-toast {
  --toast-bg: var(--toast-info-bg);
  --toast-border: var(--toast-info-border);
  --toast-text: var(--toast-info-text);
  display: grid !important;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: center;
  justify-content: stretch;
  box-sizing: border-box;
  width: min(30rem, calc(100vw - 1.5rem));
  margin: 0.75rem auto 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--toast-border);
  border-left-width: 0.35rem;
  border-radius: 0.65rem;
  color: var(--toast-text);
  background: var(--toast-bg);
  box-shadow: 0 0.65rem 1.8rem var(--dialog-shadow);
}

.swal2-popup.swal2-toast.apprise-toast--success,
#toast-container .toast.apprise-toast--success {
  --toast-bg: var(--toast-success-bg);
  --toast-border: var(--toast-success-border);
  --toast-text: var(--toast-success-text);
}

.swal2-popup.swal2-toast.apprise-toast--warning,
#toast-container .toast.apprise-toast--warning {
  --toast-bg: var(--toast-warning-bg);
  --toast-border: var(--toast-warning-border);
  --toast-text: var(--toast-warning-text);
}

.swal2-popup.swal2-toast.apprise-toast--error,
#toast-container .toast.apprise-toast--error {
  --toast-bg: var(--toast-error-bg);
  --toast-border: var(--toast-error-border);
  --toast-text: var(--toast-error-text);
}

.swal2-popup.swal2-toast.apprise-toast .swal2-icon.apprise-status-icon {
  position: static;
  grid-column: 1;
  grid-row: 1;
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  color: var(--toast-text);
}

.swal2-popup.swal2-toast.apprise-toast .swal2-title {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--toast-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.swal2-popup.swal2-toast.apprise-toast .swal2-timer-progress-bar {
  grid-column: 1 / -1;
  background: var(--toast-border);
}

.swal2-popup.swal2-toast.apprise-toast .swal2-close {
  display: none !important;
}

.swal2-popup.swal2-toast.apprise-toast .swal2-timer-progress-bar-container {
  grid-column: 1 / -1;
  grid-row: 2;
}

#toast-container .toast.apprise-toast-fallback {
  --toast-bg: var(--toast-info-bg);
  --toast-border: var(--toast-info-border);
  --toast-text: var(--toast-info-text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 0 0.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--toast-border);
  border-left-width: 0.35rem;
  border-radius: 0.65rem;
  color: var(--toast-text);
  background: var(--toast-bg);
  box-shadow: 0 0.65rem 1.8rem var(--dialog-shadow);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

#toast-container .toast.apprise-toast-fallback>span:not(.apprise-toast-fallback-icon) {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

#toast-container {
  top: 0.75rem;
  right: 50%;
  width: min(30rem, calc(100vw - 1.5rem));
  max-width: none;
  transform: translateX(50%);
}

.apprise-toast-fallback-icon {
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  flex: 0 0 auto;
}

.apprise-toast-fallback-icon .apprise-status-mark,
.apprise-toast-fallback-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.apprise-dialog__header,
.swal2-popup.apprise-popup .swal2-title {
  border-bottom: 1px solid var(--dialog-border);
  color: var(--dialog-heading);
  background: linear-gradient(115deg, var(--dialog-header-start), var(--dialog-header-end));
}

.apprise-dialog__header {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Apprise Mobile promotion dialog */
.mobile-app-dialog {
  width: min(58rem, calc(100vw - 2rem));
  max-height: min(90vh, 54rem);
  overflow-y: auto;
  color: var(--mobile-app-text);
}

.mobile-app-dialog::backdrop {
  background: rgba(5, 8, 10, 0.7);
}

.mobile-app-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(120deg,
      var(--dialog-header-start) 0%,
      var(--section-heading-start) 48%,
      var(--dialog-header-end) 100%);
}

.mobile-app-dialog__header h4 {
  margin: 0.2rem 0 0;
  color: var(--mobile-app-heading);
}

.mobile-app-dialog__badge {
  color: var(--mobile-app-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-app-dialog__heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

.mobile-app-dialog__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid color-mix(in srgb, var(--mobile-app-accent) 42%, transparent);
  border-radius: 0.75rem;
  color: var(--mobile-app-accent);
  background: linear-gradient(145deg,
      color-mix(in srgb, var(--mobile-app-accent) 18%, var(--dialog-surface-raised)),
      var(--dialog-surface-raised));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 38%, transparent),
    0 0.18rem 0.5rem color-mix(in srgb, var(--mobile-app-accent) 16%, transparent);
  flex: 0 0 auto;
}

.mobile-app-dialog__icon svg {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
}

.mobile-app-dialog__close {
  flex: 0 0 auto;
  align-self: flex-start;
}

/* Shared close control for native dialogs and SweetAlert popups. */
.apprise-dialog-close,
.swal2-popup .swal2-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2rem !important;
  min-width: 2rem;
  height: 2rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--dialog-close-border);
  border-radius: 50%;
  color: var(--dialog-close-icon) !important;
  background: var(--dialog-close-bg) !important;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}

.swal2-popup.apprise-popup .swal2-close {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  z-index: 2;
}

.apprise-dialog-close svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
}

.apprise-dialog-close:hover,
.apprise-dialog-close:focus-visible,
.swal2-popup .swal2-close:hover,
.swal2-popup .swal2-close:focus-visible {
  border-color: var(--dialog-close-hover-border);
  color: var(--dialog-close-hover-icon) !important;
  background: var(--dialog-close-hover-bg) !important;
}

.apprise-dialog-close:hover,
.swal2-popup .swal2-close:hover {
  transform: scale(1.06);
}

.swal2-popup.apprise-popup {
  width: min(34rem, calc(100vw - 2rem));
}

.swal2-popup.apprise-popup .swal2-title {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 3.8rem;
  margin: 0;
  padding: 1.05rem 4rem 1rem 1.35rem;
  grid-column: 1 / -1;
  grid-row: 1;
  text-align: left;
  font-size: 1.45rem;
  line-height: 1.2;
}

.swal2-popup.apprise-popup .swal2-icon {
  position: absolute;
  top: 0.9rem;
  left: 1.05rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border-width: 0.18rem;
  font-size: 0.55rem;
}

.swal2-icon.apprise-status-icon {
  border: 0;
  animation: none !important;
}

.apprise-status-mark {
  display: block;
  width: 100%;
  height: 100%;
}

.apprise-status-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.swal2-popup.apprise-popup--status .swal2-title {
  padding-left: 3.75rem;
}

.swal2-popup.apprise-popup .swal2-html-container {
  margin: 1.15rem 1.35rem 0.4rem;
  max-height: min(60vh, 34rem);
  overflow-y: auto;
  grid-row: 2;
  line-height: 1.5;
}

.swal2-popup.apprise-popup .swal2-actions {
  margin: 1.15rem 1.35rem 1.25rem;
  grid-row: 3;
}

.swal2-popup.apprise-popup--decision .swal2-actions {
  justify-content: flex-end;
  width: calc(100% - 2.7rem);
  gap: 0.65rem;
}

.swal2-popup.apprise-popup--decision .swal2-actions .swal2-styled {
  margin: 0;
}

.swal2-popup.apprise-popup .swal2-validation-message {
  margin: 0 1.35rem 1rem;
  border-radius: 0.45rem;
  background: var(--dialog-surface-raised);
}

.swal2-popup.apprise-popup .swal2-footer {
  margin: 0;
  padding: 1rem 1.35rem;
  border-top-color: var(--dialog-border);
  background: var(--dialog-surface-raised);
}

.swal2-popup.apprise-popup--wide {
  width: min(80rem, calc(100vw - 2rem)) !important;
}

/* The access modes help: wider than a message, narrower than a task. */
.swal2-popup.auth-access-popup {
  width: min(44rem, calc(100vw - 2rem)) !important;
}

.swal2-popup.apprise-popup--task .swal2-html-container {
  margin-bottom: 0.25rem;
}

.swal2-popup.apprise-popup--task .swal2-actions {
  min-height: 3.25rem;
}

@media (max-width: 480px) {
  .swal2-popup.apprise-popup {
    width: calc(100vw - 1rem);
  }

  .swal2-popup.apprise-popup .swal2-title {
    padding-left: 1rem;
    font-size: 1.25rem;
  }

  .swal2-popup.apprise-popup--status .swal2-title {
    padding-left: 3.75rem;
  }

  .swal2-popup.apprise-popup .swal2-html-container,
  .swal2-popup.apprise-popup .swal2-actions {
    margin-right: 1rem;
    margin-left: 1rem;
  }

  .swal2-popup.apprise-popup--decision .swal2-actions {
    width: calc(100% - 2rem);
  }
}

.apprise-dialog-close:focus-visible,
.swal2-popup .swal2-close:focus-visible {
  outline: 2px solid var(--mobile-app-accent);
  outline-offset: 2px;
}

.mobile-app-dialog__content {
  padding: 1rem;
}

.mobile-app-dialog__intro {
  display: block;
}

.mobile-app-dialog__intro p {
  margin: 0;
}

.mobile-app-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block: 1rem;
}

.mobile-app-dialog__actions .mobile-store-links {
  flex: 0 1 var(--store-width);
  margin-block: 0;
}

.mobile-app-dialog__learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  height: 40px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--mobile-app-accent);
  border-radius: 0.6rem;
  color: var(--mobile-app-accent) !important;
  background: var(--dialog-surface-raised);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 0.12rem 0.35rem color-mix(in srgb, var(--mobile-app-accent) 14%, transparent);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mobile-app-dialog__learn-more:visited,
.mobile-app-dialog__learn-more:hover,
.mobile-app-dialog__learn-more:focus-visible {
  color: var(--mobile-app-accent) !important;
}

.mobile-app-dialog__learn-more:hover,
.mobile-app-dialog__learn-more:focus-visible {
  background: var(--mobile-app-accent-soft);
}

.mobile-app-dialog__learn-more:focus-visible {
  outline: 2px solid var(--mobile-app-accent);
  outline-offset: 3px;
}

.mobile-app-dialog__learn-more span {
  margin-left: 0.45rem;
  font-size: 1rem;
}

[dir="rtl"] .mobile-app-dialog__learn-more span {
  margin-right: 0.45rem;
  margin-left: 0;
  transform: scaleX(-1);
}

.mobile-app-dialog__highlights {
  padding: 0;
  margin: 0.9rem 0;
  list-style: none;
}

.mobile-app-dialog__highlights li {
  position: relative;
  padding-left: 1.4rem;
  margin: 0.4rem 0;
  font-size: 0.92rem;
}

.mobile-app-dialog__highlights li::before {
  position: absolute;
  top: 0.58em;
  left: 0.3rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--mobile-app-accent);
  content: "";
}

.mobile-store-links {
  display: grid;
  grid-template-columns: var(--store-columns);
  align-items: center;
  gap: 12px;
  width: min(100%, var(--store-width));
  margin-block: 1rem;
  padding-block: 0.625rem;
}

.mobile-store-links a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  width: 100%;
}

.mobile-store-links a[href] {
  cursor: pointer;
}

.mobile-store-links a:focus-visible {
  outline: 2px solid var(--mobile-app-accent);
  outline-offset: 4px;
}

.mobile-store-links img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.mobile-app-dialog__preview summary {
  color: var(--mobile-app-accent);
  font-weight: 600;
  cursor: pointer;
}

.mobile-app-dialog__screenshots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.mobile-app-dialog__screenshots figure {
  margin: 0;
  text-align: center;
}

.mobile-app-dialog__screenshots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.mobile-app-dialog__screenshots figcaption {
  margin-top: 0.35rem;
  color: var(--mobile-app-muted);
  font-size: 0.75rem;
}

@media (max-width: 480px) {
  .mobile-app-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .mobile-app-dialog__screenshots {
    display: flex;
    overflow-x: auto;
  }

  .mobile-app-dialog__screenshots figure {
    flex: 0 0 76vw;
  }
}

@media (max-width: 480px) {
  .mobile-app-dialog__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-app-dialog__actions .mobile-store-links {
    width: min(100%, var(--store-width));
    flex: none;
  }

  .mobile-app-dialog__learn-more {
    width: 100%;
  }
}

@keyframes api-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


.api-details .collapsible>li.active>.collapsible-header {
  border-bottom: 1px solid;
}

.api-details .plugin-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.api-details .plugin-service-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.api-details .plugin-service-meta h5 {
  margin: 0;
}

.api-details .plugin-service-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* A link with nowhere to go, such as a service with no website, is hidden. */
.api-details .plugin-service-btn[hidden] {
  display: none;
}

.api-details .plugin-service-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid;
  border-radius: 0.35rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.api-details .plugin-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.api-details .plugin-service-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.getting-started li {
  padding: 0.3em 0;
}

.getting-started p {
  padding: 0.2em 0;
  margin: 0;
}

.getting-started-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(19rem, 0.7fr);
  gap: 1.25rem;
  align-items: stretch;
}

/* Shared page headers keep titles, supporting text, and optional controls
   consistent across primary content areas. */
.page-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--section-heading-border);
  border-left: 3px solid var(--mobile-app-accent);
  border-radius: 0.8rem;
  background: linear-gradient(118deg,
      var(--section-heading-start),
      var(--section-heading-end));
  box-shadow: 0 0.35rem 1rem var(--section-heading-shadow);
  box-sizing: border-box;
}

.page-section-heading__copy {
  min-width: 0;
}

.page-section-heading h4,
.page-section-heading h5 {
  margin: 0;
  color: var(--section-heading-title);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.page-section-heading p,
.page-section-heading__subtitle {
  margin: 0.25rem 0 0;
  color: var(--section-heading-subtitle);
  line-height: 1.4;
}

.page-section-heading__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.page-section-heading--card {
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  box-shadow: none;
}

.getting-started-card {
  min-width: 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--mobile-app-border);
  border-radius: 1rem;
  background: var(--mobile-app-surface);
}

.getting-started-card>h5,
.mobile-setup-card__heading h5 {
  margin-top: 0;
}

.getting-started-card>ol {
  margin-bottom: 0;
}

.mobile-setup-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mobile-setup-card__heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mobile-setup-card__heading h5 {
  margin-bottom: 0.15rem;
}

.mobile-setup-card__heading p {
  color: var(--mobile-app-muted);
  line-height: 1.4;
}

.mobile-setup-card__warning[hidden] {
  display: none !important;
}

.overview-mobile-qr {
  position: relative;
  width: min(100%, 16rem);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--mobile-app-border);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
}

.overview-mobile-qr:focus-visible {
  outline: 2px solid var(--mobile-app-accent);
  outline-offset: 3px;
}

.overview-mobile-qr .apprise-qr-art {
  width: 100%;
  transition: filter 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.overview-mobile-qr.is-concealed .apprise-qr-art {
  filter: blur(12px);
  opacity: 0.38;
  transform: scale(1.04);
}

.overview-mobile-qr__veil {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--mobile-app-heading);
  background: color-mix(in srgb, var(--mobile-app-surface) 62%, transparent);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.overview-mobile-qr.is-concealed .overview-mobile-qr__veil {
  display: flex;
}

.overview-mobile-qr__veil i.material-icons {
  color: var(--mobile-app-accent);
  font-size: 1.8rem;
}

.mobile-setup-card__warning {
  margin-top: 0.1rem;
}

.mobile-setup-card__error {
  color: #d44;
  text-align: center;
}

.mobile-setup-card__password-note {
  color: var(--mobile-app-muted);
  line-height: 1.4;
  text-align: center;
}

.mobile-setup-card__footer {
  margin-top: auto !important;
  color: var(--mobile-app-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 920px) {
  .getting-started-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .getting-started-card {
    padding: 1rem;
  }

  .mobile-setup-card__heading {
    align-items: flex-start;
  }

}


/* =========================================
4. Config Page, Tabs & Cards
========================================= */
.collapsible-body {
  box-sizing: content-box;
  padding: 1rem 2rem;
}

/* Materialize closes a section by shrinking it to no height, so its padding
   and border go too. */
.collapsible>li:not(.active)>.collapsible-body {
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
}

/* =========================================
Welcome Page Collapsibles
========================================= */
.api-welcome .collapsible {
  box-shadow: none;
  border: none;
  margin: 0.75rem 0 1rem;
}

.api-welcome .collapsible>li {
  border-radius: 0.4rem;
  overflow: hidden;
  margin-bottom: 0.35rem;
  box-shadow: none;
  border: 1px solid;
  /* color from theme */
}

.api-welcome .collapsible>li:last-child {
  margin-bottom: 0;
}

.api-welcome .collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-bottom: none;
}

/* Chevron on right — rotates 180° when item is open */
.api-welcome .collapsible-header::after {
  content: 'expand_more';
  font-family: 'Material Icons';
  font-size: 1.25rem;
  margin-left: auto;
  transition: transform 0.2s ease;
  line-height: 1;
}

.api-welcome .collapsible>li.active>.collapsible-header {
  border-radius: 0.4rem 0.4rem 0 0;
  border-bottom: 1px solid;
}

.api-welcome .collapsible>li.active>.collapsible-header::after {
  transform: rotate(180deg);
}

.api-welcome .collapsible-body {
  border-radius: 0 0 0.4rem 0.4rem;
  padding: 0.85rem 1rem;
  border-top: none;
}

.api-welcome .code-snippet {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.api-welcome .collapsible-body .code-snippet {
  margin-bottom: 0.85rem;
}

.api-welcome .code-snippet pre,
.api-welcome .code-snippet pre code {
  max-width: 100%;
  overflow-x: auto;
}

.api-welcome .collapsible-body .code-snippet:last-child {
  margin-bottom: 0;
}

.no-config .info {
  font-size: 3.3rem;
}

.review-empty-state {
  margin-top: 0.55rem;
}

.review-empty-card {
  border: 1px solid;
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
}

.review-empty-lead {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.review-empty-lead .info {
  font-size: 2.45rem;
  line-height: 1;
  margin-top: 0.05rem;
  flex-shrink: 0;
}

.review-empty-copy p {
  margin: 0;
  line-height: 1.5;
}

.loaded-config-heading {
  margin-bottom: 0.7rem;
}

.loaded-config-heading h5 {
  margin: 0;
}

.loaded-config-heading-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.loaded-config-heading-status {
  margin: 0;
  flex-shrink: 0;
}

.loaded-config-heading-status-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.24rem 0.7rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.loaded-config-heading-status-text .card-count {
  margin-left: 0;
  font-weight: 800;
}

.review-selected-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 1.55rem;
  cursor: pointer;
  flex-shrink: 0;
}

.review-selected-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.review-selected-filter-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3rem;
  height: 1.55rem;
  border: 1px solid var(--review-filter-toggle-ring);
  border-radius: 999px;
  background: var(--review-filter-toggle-bg);
  padding-left: 0 !important;
  box-shadow: inset 0 1px 3px var(--review-filter-toggle-inner-shadow);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.review-selected-filter input+.review-selected-filter-track::before,
.review-selected-filter input+.review-selected-filter-track::after {
  content: none !important;
  display: none !important;
}

.review-selected-filter-knob {
  position: absolute;
  left: 0.18rem;
  top: 50%;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 999px;
  background: var(--review-filter-toggle-knob);
  box-shadow: 0 1px 4px var(--review-filter-toggle-shadow);
  transform: translateY(-50%);
  transition: transform 0.16s ease, background 0.16s ease;
}

.review-selected-filter input:checked+.review-selected-filter-track {
  border-color: var(--review-filter-toggle-active-ring);
  background: var(--review-filter-toggle-active-bg);
  box-shadow:
    inset 0 1px 3px var(--review-filter-toggle-inner-shadow),
    0 0 0 2px var(--review-filter-toggle-active-halo);
}

.review-selected-filter input:checked+.review-selected-filter-track .review-selected-filter-knob {
  transform: translate(1.42rem, -50%);
  background: var(--review-filter-toggle-active-knob);
}

.review-selected-filter input:focus-visible+.review-selected-filter-track {
  outline: 2px solid var(--review-filter-toggle-focus);
  outline-offset: 2px;
}

.review-selected-filter:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.45;
}

.loaded-config-tip {
  border: 1px solid;
  border-radius: 0.8rem;
  padding: 0.85rem 1rem 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.loaded-config-tip-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  column-gap: 2.5rem;
}

.loaded-config-tip-list li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

.loaded-config-tip-list li:last-child {
  margin-bottom: 0;
}

.loaded-config-tip-send-icon {
  font-size: 1em;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  top: -0.05em;
}

@media (min-width: 1200px) {
  .loaded-config-tip-list {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .loaded-config-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .loaded-config-heading-status-text {
    white-space: normal;
  }

  .loaded-config-heading-meta {
    align-self: stretch;
    justify-content: flex-start;
  }

  .loaded-config-tip {
    padding: 0.8rem 0.85rem 0.9rem;
  }
}

#overview strong {
  display: inline-block;
}

/* Inline tab chip — used in getting-started steps to reference a tab by name */
.tab-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem 0.15rem 0.35rem;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 0.875em;
  border: 1px solid;
  vertical-align: middle;
  line-height: 1.4;
  white-space: nowrap;
}

.tab-chip-link,
.tab-chip-link:hover,
.tab-chip-link:focus {
  text-decoration: none !important;
  color: inherit !important;
}

.tab-chip-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.tab-chip .material-icons {
  font-size: 1em;
  line-height: 1;
  vertical-align: middle;
}

.tab-chip-external {
  margin: 0 0.15rem;
}

/* Key/ID highlight inside code blocks — suppress global em italic */
pre code em {
  font-style: normal;
}

/* Base Tab Structure */

.tabs {
  height: 48px;
}

.tabs .indicator {
  height: 2px;
  border-radius: 0;
}

.tabs .tab {
  height: 48px;
  padding: 0;
  text-transform: uppercase;
}

.tabs .tab span {
  height: auto;
  line-height: inherit;
}

.tabs .tab a {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.4rem 0.4rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  line-height: 1.15;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tabs .tab a .material-icons {
  position: static;
  font-size: 1.15rem;
  line-height: 1;
  transform: translateY(-1px);
}

.tabs .tab a .card-count,
.tabs .tab a .reminder-tab-count {
  margin-left: 0.1rem;
}

body .tabs .tab a:hover,
body .tabs .tab a.active {
  font-weight: 600;
}

body .tabs .tab.disabled a,
body .tabs .tab.disabled a:hover,
body .tabs .tab.disabled a i,
body .tabs .tab.disabled a:hover i {
  font-weight: inherit;
  cursor: default;
}

/* The tabs fill the strip, each taking an equal share however many are
   shown. They shrink and cut long labels short, so none is pushed out of sight. */
.tabs.config-overview {
  display: flex;
  margin-top: 0;
}

.tabs.config-overview .tab {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.tabs.config-overview .tab a {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.tabs.config-overview .tab a .config-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icons only, once a label no longer fits (set by the config page). */
.tabs.config-tabs-compact .tab a {
  justify-content: center;
  gap: 0;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.tabs.config-tabs-compact .tab a i {
  margin-right: 0 !important;
  font-size: 1.45rem;
}

.tabs.config-tabs-compact .tab a .card-count,
.tabs.config-tabs-compact .tab a .reminder-tab-count,
.tabs.config-tabs-compact .tab a .config-tab-label {
  display: none !important;
}

/* URL List Grid */
#url-list {
  display: block;
  column-count: 1;
  column-gap: 1rem;
  padding: 0;
  margin: 0;
}

#url-list ul {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.52rem 0.9rem;
}

@media (min-width: 1600px) {
  #url-list ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* When only one URL is defined, always span the full width */
#url-list ul.url-list-single {
  grid-template-columns: minmax(0, 1fr);
}

#url-list .card-panel {
  --review-control-size: 1.95rem;
  break-inside: avoid;
  page-break-inside: avoid;
  display: block;
  width: 100%;
  margin-bottom: 0;
  border-radius: 14px;
  min-height: 4em;
  position: relative;
  padding: 0.5rem 0.72rem 0.58rem;
  box-sizing: border-box;
  float: none;
  border: 1px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

#url-list .card-panel.url-item-disabled {
  cursor: not-allowed;
}

#url-list .card-panel.review-filter-hidden {
  display: none;
}

#url-list .card-panel.url-item-disabled .chip {
  cursor: default;
}

#url-list .card-panel:hover {
  transform: translateY(-1px);
}

#url-list .url-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 1.25rem;
  margin-bottom: 0.22rem;
}

#url-list .url-plugin-title {
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.1;
  opacity: 0.9;
}

#url-list .url-meta-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.34rem;
  min-width: 0;
  flex: 0 0 auto;
}

#url-list .url-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

#url-list .url-header code.url-text {
  flex: 1 1 auto;
  margin-top: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: normal;
  text-wrap: wrap;
  overflow-wrap: normal;
  word-break: normal;
  border-radius: 6px;
  padding: 0.34rem 0.5rem;
  line-height: 1.35;
}

#url-list code {
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: wrap;
  text-wrap: wrap;
  overflow-wrap: break-word;
  border-radius: 5px;
  margin-top: 0.8rem;
  display: block;
}

#url-list .card-panel .url-id {
  width: auto;
  margin: 0;
  background-color: inherit;
  padding: 0.14em 0.34em;
  font-size: 0.67em;
  border: 0;
  position: static;
  opacity: 0.78;
  letter-spacing: 0.02em;
}

/* =========================================
5. Buttons, Chips & Inputs
========================================= */
.chip {
  margin: 0.3rem;
  cursor: pointer;
}

.chip.selected {
  font-weight: 600;
}

#notify .chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-height: 3rem;
}

/* Materialize's busy dots for the tag suggestions, which are never busy. */
#notify .chips .status-info {
  display: none;
}

#notify .chips input {
  min-width: 8rem;
  line-height: 32px;
  width: auto !important;
}

#notify .chips .chip.notify-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.88rem;
  margin: 0.12rem 0.12rem 0.12rem 0;
  padding: 0 0.5rem 0 0.58rem;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

#notify .chips .chip.notify-tag-chip::before {
  content: "🏷️";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-size: 0.78rem;
  line-height: 1;
}

#notify .chips .chip.notify-tag-chip .close {
  display: inline;
  width: auto;
  height: auto;
  margin-left: 0.16rem;
  margin-right: -0.1rem;
  background: none;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.66;
}

#url-list .card-panel .url-selected-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--review-control-size);
  height: var(--review-control-size);
  border-radius: 50%;
  opacity: 0.72;
  line-height: 1;
  pointer-events: none;
  flex: 0 0 auto;
}

#url-list .card-panel:not(.selected) .url-selected-icon {
  opacity: 0.55;
}

#url-list .card-panel .url-selected-icon .material-icons {
  font-size: 1.16rem;
  line-height: 1.16rem;
  display: block;
}

#url-list .card-panel .review-group-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.18rem;
  border: 1px solid var(--review-priority-badge-ring);
  border-radius: 999px;
  background: var(--review-priority-badge-bg);
  color: var(--review-priority-badge-text);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow:
    0 0 0 2px var(--review-priority-badge-halo),
    0 2px 5px var(--review-priority-badge-shadow);
}

#url-list .card-panel .review-group-badge:empty {
  display: none;
}

#url-list .card-panel .review-retry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1rem;
  padding: 0 0.34rem;
  border: 1px solid var(--review-retry-badge-ring);
  border-radius: 999px;
  background: var(--review-retry-badge-bg);
  color: var(--review-retry-badge-text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 0 0 2px var(--review-retry-badge-halo),
    0 1px 3px var(--review-retry-badge-shadow);
}

#url-list .card-panel .review-retry-badge:empty {
  display: none;
}

#url-list .card-panel:not(.selected) .review-retry-badge {
  opacity: 0.62;
}

#url-list .card-panel .review-optional-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--review-optional-badge-ring);
  border-radius: 999px;
  background: var(--review-optional-badge-bg);
  color: var(--review-optional-badge-text);
  font-size: 0.88rem;
  line-height: 1;
  box-shadow:
    0 0 0 2px var(--review-optional-badge-halo),
    0 1px 3px var(--review-optional-badge-shadow);
}

#url-list .card-panel:not(.selected) .review-optional-badge {
  opacity: 0.68;
}

#url-list .card-panel .url-disabled-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--review-control-size);
  height: var(--review-control-size);
  border-radius: 50%;
  line-height: 1;
  flex: 0 0 auto;
}

#url-list .card-panel .url-disabled-indicator svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

#url-list .card-panel .chip {
  margin: 0.14rem 0.32rem 0.06rem 0;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Use the same theme accent for template names in the URL and header. */
#url-list .url-template-var,
#url-list .url-template-chip,
.review-template-field label {
  color: var(--mobile-app-accent);
  background: var(--mobile-app-accent-soft);
  border: 1px solid var(--mobile-app-accent);
  border-radius: 999px;
  font-family: monospace;
  font-weight: 600;
  white-space: nowrap;
}

#url-list .url-template-var {
  display: inline-block;
  position: relative;
  z-index: 0;
  padding: 0 0.2rem;
  border: 0;
  background: transparent;
  font-weight: 500;
  line-height: 1;
  vertical-align: baseline;
}

/* A slim highlight around the name, like marked text, that keeps the URL row
   height. */
#url-list .url-template-var::before {
  content: "";
  position: absolute;
  inset: -0.12rem 0 -0.16rem;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--mobile-app-accent) 45%, transparent);
  border-radius: 0.25rem;
  background: var(--mobile-app-accent-soft);
}

/* The small form shown before a test send, asking for the values an
   entry is waiting on. */
.review-template-form {
  text-align: left;
  margin-top: 0.5rem;
}

.review-template-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
}

.review-template-control {
  width: 100%;
}

.review-template-field label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 1.28rem;
  padding: 0.05rem 0.38rem 0.1rem;
  box-sizing: border-box;
  font-size: 0.8rem;
  line-height: 1;
}

.review-template-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 2.7rem 0.3rem 0.45rem !important;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 4px;
  font-family: monospace;
}

.review-template-field input::placeholder {
  color: inherit;
  opacity: 0.28;
}

.review-template-field input.is-invalid {
  border-color: var(--form-error-border) !important;
  box-shadow: 0 1px 0 0 var(--form-error-border) !important;
}

.review-template-error {
  color: var(--form-error-text);
  font-size: 0.78rem;
  line-height: 1.2;
}

.review-template-summary-error {
  margin: 0 0 1rem;
}

.review-template-summary-error[hidden] {
  display: none;
}

.review-template-field .value-visibility-toggle {
  right: 0.35rem;
  top: 0.15rem;
}

/* Compact template names sit before the card's status controls. */
#url-list .url-template-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.22rem;
  min-width: 0;
}

#url-list .url-template-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.28rem;
  padding: 0.05rem 0.38rem 0.1rem;
  box-sizing: border-box;
  font-size: 0.66rem;
  line-height: 1;
}

#url-list .url-tags-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  min-height: 1.55rem;
}

#url-list .url-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.12rem 0.18rem;
  flex: 1 1 auto;
  min-width: 0;
}

#url-list .review-test-btn {
  margin-left: auto;
  border-radius: 8px !important;
  padding: 0;
  min-width: var(--review-control-size);
  width: var(--review-control-size);
  height: var(--review-control-size);
  min-height: var(--review-control-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
  border: 1px solid transparent;
}

#url-list .review-test-btn .material-icons {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
}

#url-list .review-test-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

#url-list .copy-url-btn,
.config-id-visibility.btn-flat,
.config-id-apply.btn-flat,
.config-id-revert.btn-flat,
.config-id-randomize.btn-flat,
.config-id-copy.btn-flat,
.config-id-qr.btn-flat,
.config-list-move.btn-flat,
.config-list-delete.btn-flat,
.snippet-visibility-btn,
.snippet-copy-btn {
  border-radius: 8px !important;
  flex: 0 0 auto;
  padding: 0 0.35rem;
  min-width: 0;
  background-color: transparent;
}

#url-list .copy-url-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--review-control-size);
  height: var(--review-control-size);
  min-width: var(--review-control-size);
  min-height: var(--review-control-size);
  margin: 0;
  padding: 0;
  line-height: 1;
}

#url-list .copy-url-btn .material-icons,
.config-id-visibility.btn-flat .material-icons,
.config-id-apply.btn-flat .material-icons,
.config-id-revert.btn-flat .material-icons,
.config-id-copy.btn-flat .material-icons,
.config-list-move.btn-flat .material-icons,
.config-list-delete.btn-flat .material-icons,
.snippet-visibility-btn .material-icons,
.snippet-copy-btn .material-icons {
  font-size: 1.1rem;
}

#url-list .copy-url-btn .material-icons {
  display: block;
  line-height: 1;
}

@media (max-width: 600px) {
  #url-list .url-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #url-list .url-meta-right {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

.config-id-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.config-id-label,
.config-list-header>span {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  flex-shrink: 0;
  opacity: 0.65;
}

.config-id-select-form {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.6rem;
  min-width: 0;
}

.config-id-wrapper {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.3rem;
  min-width: 0;
  overflow: hidden;
}

/* Give Materialize selects the same compact surface across the application. */
.select-wrapper input.select-dropdown {
  position: relative;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  padding: 0 2.35rem 0 0.8rem;
  border: 1px solid var(--select-border) !important;
  border-radius: 0.55rem !important;
  background: var(--select-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  box-sizing: border-box;
  /* The line fills the space inside the 1px borders, so letters that hang
     below the line, such as g or y, have room and are never cut off. */
  line-height: calc(2.75rem - 2px);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.select-wrapper:hover input.select-dropdown:not(:focus):not([disabled]) {
  border-color: var(--select-border-hover) !important;
}

.select-wrapper input.select-dropdown[disabled] {
  opacity: 0.58;
}

.input-field>label:has(+ .select-wrapper) {
  top: -0.35rem;
  z-index: 1;
}

.select-wrapper .caret {
  right: 0.75rem;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.dropdown-content.select-dropdown {
  padding: 0.3rem;
  border-radius: 0.55rem;
}

.dropdown-content.select-dropdown li {
  min-height: 2.55rem;
  border-radius: 0.38rem;
}

.dropdown-content.select-dropdown li>span {
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.config-file-times {
  display: grid;
  grid-template-columns: max-content max-content;
  flex: 0 0 auto;
  align-self: flex-start;
  column-gap: 0.55rem;
  row-gap: 0.12rem;
  margin: 0 0 0 auto;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: nowrap;
}

.config-file-times[hidden] {
  display: none;
}

.config-file-time {
  display: contents;
}

.config-file-time dt {
  font-weight: 500;
  opacity: 0.62;
}

.config-file-time dd {
  margin: 0;
  font-family: monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 600px) {
  #config .config-file-times {
    width: 100%;
    grid-template-columns: max-content 1fr;
  }
}

.config-id-visibility.btn-flat,
.config-id-copy.btn-flat {
  margin-left: 0.1rem;
}

.config-id-apply.btn-flat {
  color: #f29f3d;
}

.config-id-revert.btn-flat {
  color: #d9822b;
}

.config-id-apply.btn-flat[hidden],
.config-id-revert.btn-flat[hidden] {
  display: none;
}

.config-id-mismatch-notice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: -0.35rem 0 0.75rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid;
  border-radius: 0.4rem;
  font-size: 0.82rem;
}

.config-id-mismatch-notice[hidden] {
  display: none;
}

.config-id-mismatch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
}

.config-id-mismatch-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
}

.config-id-mismatch-title {
  font-weight: 700;
}

.config-id-mismatch-action.btn-flat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.12rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  line-height: 1.35rem;
  vertical-align: middle;
}

.config-id-mismatch-action.btn-flat i.material-icons {
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
}

.config-id-randomize.btn-flat span,
.config-id-randomize.btn-flat svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.config-id-input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  height: auto !important;
  margin: 0 !important;
  padding: 0.15em 0.45em !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0.3rem !important;
  box-shadow: none !important;
  font-family: monospace;
  font-size: 1em !important;
  font-weight: 700;
}

code.config-id {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 1em;
  font-weight: 700;
  white-space: nowrap;
}

code.config-id::-webkit-scrollbar {
  display: none;
}

/* A soft edge hints that a revealed ID continues beyond the available room. */
code.config-id:not(.is-concealed) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
}

code.config-id.is-concealed {
  letter-spacing: 0.08em;
}

.config-auth-link.btn-flat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0 0.35rem;
}

.config-auth-icon,
.config-auth-icon svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.config-auth-icon svg {
  fill: none;
  stroke: currentColor;
}

.config-auth-icon .auth-state-lock,
.config-auth-icon .auth-state-unlock {
  display: block;
}

.auth-state-indicator:not(.auth-state-public, .auth-state-off) .auth-state-unlock,
.auth-state-indicator:is(.auth-state-public, .auth-state-off) .auth-state-lock {
  display: none;
}

.auth-state-indicator {
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.auth-state-indicator.auth-state-admin {
  opacity: 1;
}

.config-auth-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 2rem;
}

.config-auth-status.is-unassigned {
  opacity: 0.55;
}

.collection-item .config-auth-status {
  margin-right: 0.45rem;
  vertical-align: middle;
}

.config-list-auth-link {
  display: contents;
}

.config-list-auth-link:hover .config-auth-icon,
.config-list-auth-link:focus-visible .config-auth-icon {
  color: inherit;
  opacity: 0.75;
}

.config-list-auth-link:hover .config-list-user,
.config-list-auth-link:focus-visible .config-list-user {
  text-decoration: underline;
}

.config-list-item {
  display: grid;
  grid-template-columns: 2rem minmax(4rem, 10rem) 4.5rem minmax(10rem, 1fr) auto;
  grid-template-areas: "auth-status user access config-id actions";
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.config-list-item .config-auth-status {
  grid-area: auth-status;
  margin-right: 0;
}

.config-list-link {
  grid-area: config-id;
  min-width: 0;
  overflow: hidden;
}

.config-list-user {
  grid-area: user;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-list-access {
  grid-area: access;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-list-link code.config-id {
  width: 100%;
  box-sizing: border-box;
}

.config-list-actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  justify-self: end;
  flex: 0 0 auto;
}

.collection.config-list-collection {
  overflow: hidden;
  border-color: var(--config-list-border);
  border-radius: 0.55rem;
  background: var(--select-bg);
}

.collection.config-list-collection .config-list-item {
  padding: 0.65rem 0.85rem;
  border-color: var(--config-list-border);
  color: var(--config-list-text);
  background: var(--config-list-row);
  transition: background-color 0.15s ease;
}

.collection.config-list-collection .config-list-item:hover {
  background: var(--config-list-row-hover);
}

/* The column headings row stays still under the pointer. */
.collection.config-list-collection .config-list-header,
.collection.config-list-collection .config-list-header:hover {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: var(--config-list-row);
}

.config-list-collection .config-list-link code.config-id {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-color: var(--config-list-border) !important;
  color: var(--config-list-text) !important;
  background: var(--config-list-id-bg) !important;
  line-height: 1.2rem;
}

.config-list-collection .config-list-actions .btn-flat {
  color: var(--config-list-action);
}

.config-list-collection .config-list-actions .btn-flat:hover,
.config-list-collection .config-list-actions .btn-flat:focus-visible {
  color: var(--mobile-app-accent) !important;
  background: var(--config-list-id-bg);
}

/* The Configuration List and Reminder List headings sit the same distance below the banner. */
.config-list-heading,
.reminder-overview>.page-section-heading {
  margin-top: 1rem;
}

.config-list-heading h4 {
  margin: 0;
}

.config-list-toggle-all {
  border-radius: 8px !important;
  flex: 0 0 auto;
  padding: 0 0.5rem;
  min-width: 0;
  background-color: transparent;
}

/* An empty list has nothing to show or hide. */
.config-list-toggle-all.btn-flat[hidden] {
  display: none;
}

.config-list-toggle-all .material-icons {
  font-size: 1.75rem;
}

@media (max-width: 640px) {

  /* On phones the actions share the top row with the username and access,
     and the Config ID gets the full width underneath. */
  .config-list-item {
    grid-template-columns: 2rem minmax(0, 1fr) auto auto;
    grid-template-areas:
      "auth-status user access actions"
      "config-id config-id config-id config-id";
    row-gap: 0.5rem;
  }

  .config-list-actions {
    margin-left: 0;
    justify-self: end;
  }

  /* The rows are stacked on phones, so the headings no longer line up. */
  .config-list-collection .config-list-header {
    display: none;
  }
}

/* =========================================
Authentication Editor
========================================= */
.auth-page {
  max-width: 64rem;
}

.auth-page-heading {
  margin-bottom: 1rem;
}

.auth-page-heading p {
  margin: 0.2rem 0 0;
}

/* The title takes the room left by the access card, which drops below it on
   a narrow screen. */
.auth-page-heading .page-section-heading__copy {
  flex: 1 1 20rem;
}

/* Who is signed in, as a small card on the right of the page heading. It
   takes the access mode colours: purple for the administrator, blue for a user. */
.auth-mode-status {
  --auth-mode-color: var(--auth-state-admin);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.8rem 0.45rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--auth-mode-color) 45%, transparent);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--auth-mode-color) 12%, transparent);
  color: var(--auth-mode-color);
  box-sizing: border-box;
}

.auth-mode-status.is-user {
  --auth-mode-color: var(--auth-state-user);
}

.auth-mode-status__icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.auth-mode-status__icon svg {
  width: 100%;
  height: 100%;
}

.auth-mode-status__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.auth-mode-status__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.auth-mode-status__copy strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-mode-status__indicator {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, currentColor 18%, transparent);
}

/* As many columns as fit (three on a wide screen, then two), each card only
   as tall as its own content. */
.auth-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: start;
  gap: 1.5rem;
}

.auth-editor-card[hidden] {
  display: none;
}

.auth-editor-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid;
  border-radius: 1.4rem;
}

.auth-card-heading {
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-card-heading h5 {
  margin: 0.5rem 0 0;
}

.auth-card-icon {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto;
}

.auth-card-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-lock-card-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.auth-card-icon .config-auth-icon,
.auth-card-icon .config-auth-icon svg {
  width: 100%;
  height: 100%;
}

.auth-card-heading.auth-compact-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  text-align: left;
}

.auth-compact-heading .auth-card-icon {
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0.55rem;
  flex: 0 0 3rem;
  border: 1px solid;
  border-radius: 0.8rem;
  box-sizing: border-box;
}

.auth-compact-heading h5 {
  margin: 0;
  font-size: 1.25rem;
}

/* Each card opens with the same gradient band as the page headings. */
.auth-editor-card>.auth-card-heading.auth-compact-heading {
  margin: -1.25rem -1.25rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--auth-tint-border, var(--section-heading-border));
  border-radius: calc(1.4rem - 1px) calc(1.4rem - 1px) 0 0;
  background: linear-gradient(118deg,
      var(--auth-tint-start, var(--section-heading-start)),
      var(--section-heading-end));
}

/* Once the Config ID has a login, the Configuration Login heading takes the
   colour of its access mode (the same as its lock everywhere else). */
.auth-credentials-card .auth-card-heading:has(.auth-state-public) {
  --auth-tint: var(--auth-state-public);
}

.auth-credentials-card .auth-card-heading:has(.auth-state-locked) {
  --auth-tint: var(--auth-state-locked);
}

.auth-credentials-card .auth-card-heading:has(.auth-state-user) {
  --auth-tint: var(--auth-state-user);
}

.auth-credentials-card .auth-card-heading:has(.auth-state-disabled) {
  --auth-tint: var(--auth-state-disabled);
}

.auth-credentials-card .auth-card-heading:has(.auth-state-public, .auth-state-locked, .auth-state-user, .auth-state-disabled) {
  --auth-tint-start: color-mix(in srgb, var(--auth-tint) 22%, var(--section-heading-end));
  --auth-tint-border: color-mix(in srgb, var(--auth-tint) 45%, transparent);
}

.auth-credentials-card .auth-card-heading:has(.auth-state-public, .auth-state-locked, .auth-state-user, .auth-state-disabled) .auth-card-icon {
  border-color: color-mix(in srgb, var(--auth-tint) 55%, transparent);
  background-color: color-mix(in srgb, var(--auth-tint) 14%, var(--section-heading-end));
}

.auth-compact-heading p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.auth-move-card-icon svg {
  fill: currentColor;
}

.auth-reminder-limits-card .reminder-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0;
}

.reminder-limits-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  column-gap: 1rem;
}

.auth-reminder-limits-card .reminder-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--reminder-muted);
}

.auth-credential-fields {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.auth-credential-field {
  width: 100%;
  min-width: 0;
  margin: 1rem 0 1.5rem;
}

/* Labels in these cards always sit above their field, empty or not, so every
   card lines up the same way. */
.auth-editor-card .input-field>label:not(.label-icon) {
  transform: translateY(-14px) scale(0.8);
  transform-origin: 0 0;
}

/* This label sits above a custom select/help row instead of floating over an
   input. Match Materialize's selector specificity so it is correct on first paint.
   The negative top margin lines it up with the floating labels beside it. */
.auth-editor-card .input-field>label.auth-access-label {
  display: block;
  position: static;
  margin: -0.875rem 0 0.1rem;
  font-size: 0.8rem;
  cursor: default;
  transform: none;
}

.auth-access-control-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.auth-access-control-row .select-wrapper,
.auth-access-control-row>select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.auth-access-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  line-height: 1.8rem;
  border: 1px solid;
  border-radius: 50%;
  flex: 0 0 1.8rem;
}

.auth-access-help i.material-icons {
  color: inherit;
  font-size: 1.05rem;
  line-height: 1.8rem;
}

.auth-access-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.auth-access-warning-icon {
  display: flex;
  flex: 0 0 auto;
  width: 1rem;
  height: 1.1rem;
}

.browser-login-submit-icon svg,
.auth-access-warning-icon svg {
  width: 100%;
  height: 100%;
}

.swal2-popup .auth-access-table {
  width: 100%;
  margin: 0;
  text-align: left;
}

.swal2-popup .auth-access-table th,
.swal2-popup .auth-access-table td {
  padding: 0.65rem 0.5rem;
  vertical-align: top;
}

.swal2-popup .auth-access-table th:first-child {
  width: 6rem;
  white-space: nowrap;
}

.swal2-popup .auth-save-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.swal2-popup .auth-save-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid;
  border-radius: 50%;
}

.swal2-popup .auth-save-copy i.material-icons {
  color: inherit;
  font-size: 1.25rem;
}

.config-id-qr-icon,
.config-id-qr-icon svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.config-id-qr-icon svg {
  overflow: visible;
}

/* Font icons are centred the same way as the drawn icons (QR, dice) beside them. */
.config-id-qr.btn-flat,
.config-id-visibility.btn-flat,
.config-id-copy.btn-flat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}



.apprise-qr-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.swal2-popup.apprise-popup--qr {
  width: min(23rem, calc(100vw - 1rem)) !important;
}

.apprise-qr-art {
  position: relative;
  width: 16rem;
  max-width: 100%;
}

.apprise-qr-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  /* Keep QR modules sharp; the logo is a separate, smoothly scaled image. */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.apprise-qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.apprise-qr-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.apprise-qr-warning-icon i.material-icons {
  display: block;
  color: inherit !important;
  font-size: 1.15rem;
  line-height: 1;
}

.apprise-qr-url-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.apprise-qr-url {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  text-align: left;
}

.apprise-qr-url-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.apprise-qr-visibility,
.apprise-qr-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid;
  border-radius: 50%;
  flex: 0 0 auto;
}

.apprise-qr-visibility i.material-icons,
.apprise-qr-copy i.material-icons {
  color: inherit;
  font-size: 1.1rem;
}

.apprise-qr-note {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.75;
}

/* The icon sits beside the first line, however long the text runs. */
.apprise-qr-note--warning {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--notify-log-warning-border);
  border-radius: 0.55rem;
  background: var(--notify-log-warning-bg);
  opacity: 1;
  text-align: left;
  box-sizing: border-box;
}

.apprise-qr-warning-icon,
.apprise-qr-warning-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.apprise-qr-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.apprise-qr-warning-icon svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
}

.apprise-qr-note-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
  text-align: left;
}

.apprise-qr-warning-title {
  color: inherit;
  font-size: 0.85rem;
  line-height: 1.25;
}

/* Keep the warning heading part of the card instead of inheriting the
   Getting Started emphasis background. */
#overview .apprise-qr-warning-title {
  display: block;
  color: inherit !important;
  background: transparent !important;
}

.apprise-qr-note-text {
  line-height: 1.4;
}

.apprise-qr-error {
  width: 16rem;
  max-width: 100%;
  margin: 0;
  padding: 1rem;
  border: 1px dashed;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.85;
  box-sizing: border-box;
}

.auth-password-fields {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.concealed-field {
  position: relative;
}

.concealed-field input {
  padding-right: 2.5rem !important;
  box-sizing: border-box !important;
}

/* Concealed values (templates, Config IDs) are drawn as dots without becoming
   password fields that browsers and password managers offer to fill. */
input[data-concealed-text="true"]:not(.value-is-visible) {
  -webkit-text-security: disc;
  text-security: disc;
}

/* The same height as the small dice button beside it, so their icons line up. */
.value-visibility-toggle {
  position: absolute;
  right: 0.75rem;
  top: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 2rem;
}

.value-visibility-toggle .material-icons,
.config-id-visibility.btn-flat .material-icons,
.config-id-copy.btn-flat .material-icons {
  display: block;
  line-height: 1;
}

.value-visibility-toggle:focus {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.value-visibility-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 1px;
}

/* The eye (and the dice beside it) sit inside their field, so they have no
   fill of their own (the light theme gives flat buttons one). Fields that need
   one to cover text set their own. */
.value-visibility-toggle.btn-flat,
.value-visibility-toggle.btn-flat:hover,
.value-visibility-toggle.btn-flat:focus,
.value-visibility-toggle.btn-flat:active,
.move-destination-field .config-id-randomize.btn-flat,
.move-destination-field .config-id-randomize.btn-flat:hover,
.move-destination-field .config-id-randomize.btn-flat:focus,
.move-destination-field .config-id-randomize.btn-flat:active {
  background-color: transparent;
}

.move-destination-field input {
  padding-right: 5rem !important;
}

.move-destination-field .value-visibility-toggle {
  right: 2.85rem;
}

.move-config-randomize {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  min-width: 2rem;
  padding: 0 !important;
}

.reset-access-dialog {
  width: 100%;
  text-align: left;
}

.reset-access-dialog>p {
  margin: 0 0 0.9rem;
  line-height: 1.45;
}

.reset-access-config-id {
  margin: 0.5rem 0 1rem;
}

.reset-access-config-id input {
  font-family: monospace;
}

.move-confirmation-dialog .reset-access-config-id {
  margin-bottom: 0.55rem;
}

.move-confirmation-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: -0.1rem 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.72;
  text-transform: uppercase;
}

.move-confirmation-direction .material-icons {
  font-size: 1rem;
}

.reset-configuration-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid;
  border-radius: 0.65rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.reset-configuration-toggle[hidden] {
  display: none;
}

.reset-configuration-toggle+.reset-configuration-toggle {
  margin-top: 0.5rem;
}

.reset-configuration-toggle__track {
  position: relative;
  width: 2.35rem;
  height: 1.3rem;
  flex: 0 0 2.35rem;
  border: 1px solid;
  border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.reset-configuration-toggle__track>span {
  position: absolute;
  top: 0.17rem;
  left: 0.18rem;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.reset-configuration-toggle[aria-checked="true"] .reset-configuration-toggle__track>span {
  transform: translateX(1.02rem);
}

.reset-configuration-toggle__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reset-configuration-toggle__copy strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

.reset-configuration-toggle__copy small {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.reset-configuration-toggle:focus {
  outline: none;
}

.reset-configuration-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.input-field.has-errors input,
.input-field.has-errors input:focus {
  border-bottom-color: #f44336 !important;
  box-shadow: 0 1px 0 0 #f44336 !important;
}

.input-field.has-errors label,
.input-field .errorlist {
  color: #c62828;
}

.input-field .errorlist {
  padding: 0;
  margin: -0.75rem 0 0;
  font-size: 0.78rem;
  list-style: none;
}

/* The login page is centered because it does not use the side menu. */
.browser-login-layout {
  display: flex;
  justify-content: center;
  float: none !important;
}

.browser-login-page {
  width: min(100%, 34rem);
  margin: 1.25rem 0;
}

.browser-login-card {
  padding: 2.25rem 2.75rem 2.5rem;
  border: 1px solid;
  border-radius: 1.4rem;
}

.auth-logout-success {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
  border: 1px solid var(--auth-logout-success-border);
  border-radius: 0.65rem;
  color: var(--auth-logout-success-text);
  background: var(--auth-logout-success-bg);
  font-weight: 600;
}

.auth-logout-success .material-icons {
  color: inherit;
  font-size: 1.35rem;
}

.browser-login-icon {
  display: block;
  width: 6.75rem;
  height: 6.75rem;
  margin: 0 auto 0.75rem;
}

.browser-login-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.browser-login-heading {
  text-align: center;
}

.browser-login-heading h4 {
  margin: 0;
}

.browser-login-heading p {
  margin: 0.5rem 0 2rem;
}

.browser-login-field {
  margin: 1.5rem 0 2rem;
}

.browser-login-note {
  margin: -0.6rem 0 1.5rem;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.82;
}

.browser-login-mobile-promo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.9rem;
  row-gap: 0.6rem;
  padding: 0.8rem 1rem 0.8rem 1.1rem;
  margin: 1.5rem 0 0;
  border: 1px solid var(--mobile-app-border);
  border-radius: 1rem;
  text-decoration: none !important;
  background: var(--mobile-app-surface);
  transition: border-color 0.15s ease;
}

.browser-login-mobile-promo:focus-within {
  border-color: var(--mobile-app-accent);
}

.browser-login-mobile-promo__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
}

.browser-login-mobile-promo__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--mobile-app-accent);
}

.browser-login-mobile-promo__text {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--mobile-app-text);
}

.browser-login-mobile-promo__text strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.05rem;
  color: var(--mobile-app-heading);
}

/* The store badges stack on the right, both the same width. */
.browser-login-mobile-promo .mobile-store-links {
  grid-template-columns: 1fr;
  gap: 0.4rem;
  width: 7.75rem;
  margin-block: 0;
  padding-block: 0;
}

.browser-login-mobile-promo .mobile-store-links a {
  min-height: 0;
}

/* On a narrow screen the badges move under the text, side by side. */
@media (max-width: 420px) {
  .browser-login-mobile-promo {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .browser-login-mobile-promo .mobile-store-links {
    grid-column: 2;
    grid-template-columns: var(--store-columns);
    width: min(100%, var(--store-width));
  }
}

.auth-login-error {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1.4rem;
  border: 1px solid;
  border-radius: 0.55rem;
}

.auth-login-error .material-icons {
  color: inherit;
}

.auth-login-error .errorlist {
  padding: 0;
  margin: 0;
  list-style: none;
}

.auth-form-error[hidden] {
  display: none;
}

.browser-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  position: relative;
}

.browser-login-submit-icon {
  position: absolute;
  right: 1rem;
  display: flex;
  width: 1.3rem;
  height: 1.3rem;
}

.auth-content-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid;
  border-radius: 0.75rem;
}

/* The username/password toggles and the dice button share one row, just above Save.
   The section starts closed and opens when its title is clicked. */
.auth-generate {
  margin: -0.5rem 0 1rem;
}

.auth-generate summary {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.auth-generate summary::-webkit-details-marker {
  display: none;
}

.auth-generate summary i.material-icons {
  font-size: 1.1rem;
  color: inherit;
  transition: transform 0.15s ease;
}

.auth-generate[open] summary i.material-icons {
  transform: rotate(90deg);
}

.auth-generate[open] summary {
  margin-bottom: 0.4rem;
}

.auth-generate-row {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}

.auth-generate-row .auth-randomize-options {
  flex: 1 1 auto;
}

.auth-content-panel form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.auth-tool-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

/* No divider while there is no login to reset. */
.auth-remove-option:has(> [hidden]) {
  display: none;
}

.auth-remove-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid;
}

.auth-content-panel .auth-form-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  border-radius: 0.55rem;
  box-shadow: none;
}

.auth-content-panel .auth-form-actions .btn i.material-icons.right {
  float: none;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1;
}

/* The generate dice is a full button, the height of the toggles beside it. */
.auth-randomize-button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-width: 3rem;
  padding: 0 0.8rem;
  /* The same corners and edge width as the toggles beside it. */
  border: 1px solid transparent;
  border-radius: 0.5rem;
}

.auth-randomize-button svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}

.auth-generate-hint {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

/* The dice in the instructions: text sized, with the button's colours and
   edge, so it reads as the button to press. */
.auth-generate-dice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  vertical-align: -0.2em;
}

.auth-generate-dice svg {
  display: block;
  width: 1em;
  height: 1em;
}

.auth-randomize-options {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.auth-randomize-option {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1rem;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.auth-randomize-option:focus {
  outline: none;
  box-shadow: none;
}

.auth-randomize-option:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.auth-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

.auth-form-actions .btn {
  width: 100%;
}

.auth-remove-option>.auth-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid;
  border-radius: 0.55rem;
  box-shadow: none;
}

.auth-remove-option>.auth-remove-button i.material-icons.right {
  float: none;
  margin: 0;
}

.auth-remove-option>.auth-remove-button i.material-icons {
  display: inline-flex;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 1.2rem;
  margin: 0;
  float: none;
  line-height: 1;
  overflow: hidden;
}

.auth-remove-option>.auth-remove-button span {
  display: inline-flex;
  align-items: center;
}

.auth-remove-button[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .auth-card-grid {
    grid-template-columns: minmax(0, 38rem);
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .browser-login-page {
    margin: 0.85rem 0;
  }

  .browser-login-card {
    padding: 1.75rem 1.4rem 2rem;
  }

}

.swal2-popup .cfggen-modal-copy {
  text-align: center;
}

.swal2-popup .cfggen-modal-copy p {
  margin: 0.35rem 0;
}

.swal2-popup .cfggen-modal-copy .config-id-bar {
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.75rem auto;
  max-width: 100%;
}

.swal2-popup .cfggen-modal-copy code.config-id {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.swal2-popup .cfggen-modal-copy .config-id-input {
  width: auto;
}

.code-snippet {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-bottom: 1rem;
}

.code-snippet pre {
  width: 100%;
  margin: 0;
}

.code-snippet pre code {
  display: block;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.7rem 5.35rem 0.7rem 0.6rem;
  overflow-x: auto;
  box-sizing: border-box;
}

.snippet-copy-btn,
.snippet-visibility-btn {
  position: absolute;
  top: 0.35rem;
  border-radius: 6px;
}

.snippet-copy-btn {
  right: 0.5rem;
}

.snippet-visibility-btn {
  right: 2.75rem;
}

.snippet-copy-btn i,
.snippet-visibility-btn i {
  /* Better alignment */
  margin: -0.3em 0 0 0;
}

#overview .code-snippet:not(.is-ready) pre {
  visibility: hidden;
}

.snippet-config-id.is-concealed {
  letter-spacing: 0.08em;
}

.snippet-password-warning {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.3rem 0.15rem 0;
  color: var(--mobile-app-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.snippet-password-warning .material-icons {
  flex: 0 0 auto;
  color: var(--mobile-app-accent);
  font-size: 1rem;
}

/* File Input Hack */
.btn-file {
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.btn-file input[type=file] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  outline: none;
  background: white;
  cursor: inherit;
  display: block;
}

.file-selected {
  line-height: 2.0em;
  font-size: 1.2rem;
  border-radius: 5px;
  padding: 0 1em;
  overflow: hidden;
}

/* Health Check */
#health-check {
  border-radius: 16px;
  padding: 1.45rem 1.6rem;
  margin-bottom: 2em;
  border: 1px solid transparent;
}

#health-check .health-check-title {
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid transparent;
}

#health-check .health-check-intro {
  margin: 0 0 0.9rem;
  font-size: 1.02rem;
}

#health-check .health-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

#health-check .health-check-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#health-check .health-check-list {
  list-style: none;
  margin: 0.95rem 0 0.25rem;
  padding: 0;
}

#health-check .health-check-list li {
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.9rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
}

#health-check .health-check-list li:last-child {
  margin-bottom: 0;
}

#health-check .health-check-list li strong {
  font-weight: 600;
  font-size: 1.12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

#health-check p {
  margin-top: 0.45rem;
  line-height: 1.45;
}

#health-check>p {
  margin-top: 0.9rem;
}

#health-check .health-check-more {
  margin-top: 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  padding: 0.2rem 0.75rem 0.3rem;
}

#health-check .health-check-more summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 0.35rem 0;
}

#health-check .health-check-more summary::-webkit-details-marker {
  display: none;
}

#health-check .health-check-more summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 0.15s ease;
}

#health-check .health-check-more[open] summary::before {
  transform: rotate(90deg);
}

#health-check .health-check-more-content {
  margin-top: 0.15rem;
  padding-top: 0.3rem;
}

#health-check .health-check-snippet {
  margin: 0.4rem 0 0.7rem;
}

#health-check .health-check-snippet pre {
  margin: 0;
  border-radius: 0.45rem;
  overflow-x: auto;
}

#health-check .health-check-snippet code {
  display: block;
  padding: 0.6rem 0.75rem;
  white-space: pre;
}

@media (max-width: 640px) {
  #health-check {
    padding: 1.1rem 1rem;
  }

  #health-check .health-check-title {
    font-size: 1.5rem;
  }
}

#notify .notify-form-section .input-field>label {
  position: static;
  display: block;
  margin: 0 0 0.2rem 0;
  transform: none;
  color: var(--mobile-app-accent);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
}

.notify-target-guidance {
  margin-top: 0.5rem;
  margin-bottom: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid;
  border-radius: 0.55rem;
  line-height: 1.5;
}

.notify-target-guidance-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.notify-target-guidance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.notify-target-guidance-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
}

.notify-target-keyword {
  font-weight: 700;
}

.notify-attachments-field input[type=file] {
  /* Hidden, we trigger it from our Browse button */
  display: none;
}

.notify-attachments-field .btn-file {
  display: inline-flex;
  margin-top: 0;
}

#notify #id_body.notify-missing {
  border-color: rgba(255, 183, 77, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(255, 183, 77, 0.55);
}

#notify .notify-attachments-field .btn-file.notify-missing {
  box-shadow: inset 0 0 0 1px rgba(255, 183, 77, 0.7), 0 0 0 2px rgba(255, 183, 77, 0.2);
}

#notify .notify-form-actions .btn,
#notify .notify-form-actions .btn-clear-form,
#config .config-toolbar .config-url-builder-btn,
#config .config-form-actions .btn {
  min-height: 2.8rem;
  height: 2.8rem;
  line-height: 2.8rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 1rem;
}

#notify .notify-form-actions .btn i.material-icons,
#notify .notify-form-actions .btn-clear-form i.material-icons,
#config .config-toolbar .config-url-builder-btn i.material-icons,
#config .config-form-actions .btn i.material-icons {
  font-size: 1.3rem;
  line-height: 1;
  margin: 0;
}

#notify .notify-form-actions .btn i.right,
#notify .notify-form-actions .btn-clear-form i.right,
#config .config-toolbar .config-url-builder-btn i.right,
#config .config-form-actions .btn i.right {
  margin-left: 0.45rem;
  margin-right: 0;
}

.notify-attachments-list {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.notify-attachments-list .attachment-chip {
  max-width: 100%;
  border-radius: 16px;
  padding: 0 0.75rem;
  line-height: 1.8;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.notify-attachments-list .attachment-chip i.material-icons {
  font-size: 1.1rem;
  margin-left: 0.25rem;
}

/* The icon saying what kind of attachment it is: a stored file, an upload or a web address. */
.notify-attachments-list .attachment-chip i.attachment-chip-kind {
  margin-left: 0;
  margin-right: 0.35rem;
}

/* Browse and Add URL sit together at the right of the heading. */
.notify-attachments-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* A web address row: the address, then Preview and Remove. */
.notify-template-row.notify-attach-row {
  grid-template-columns: minmax(0, 1fr) 2.5rem 2.5rem;
}

/* An Apprise URL row: the URL and its remove button. */
.notify-template-row.notify-url-row {
  grid-template-columns: minmax(0, 1fr) 2.5rem;
}

.notify-attach-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--select-border);
  border-radius: 7px;
}

.notify-attach-preview i.material-icons {
  font-size: 1.2rem;
}

/* Previews need a saved configuration. */
.notify-attach-no-preview .notify-attach-preview {
  display: none;
}

#notify .notify-attach-row input.invalid,
#notify .notify-url-row input.invalid {
  border-color: var(--form-error-text) !important;
}

/* What Preview shows: the file, or why it could not be downloaded. */
.notify-attach-preview-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.notify-attach-preview-status {
  margin: 0;
  color: var(--notify-log-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.notify-attach-preview-status.is-error {
  color: var(--form-error-text);
}

.notify-attach-preview-body img,
.notify-attach-preview-body video {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.notify-attach-preview-body pre {
  width: 100%;
  max-height: 50vh;
  margin: 0;
  padding: 0.65rem;
  overflow: auto;
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--select-border);
  border-radius: 7px;
  background: var(--select-bg);
  color: var(--select-text);
}

/* Why the server would not download an address: a headline, one sentence,
   the setting to change and a link to read more. */
.notify-attach-blocked {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--notify-log-warning-border);
  border-radius: 0.55rem;
  background: var(--notify-log-warning-bg);
  text-align: start;
  box-sizing: border-box;
}

.notify-attach-blocked i.material-icons {
  font-size: 1.75rem;
  color: inherit;
}

.notify-attach-blocked strong {
  display: block;
  font-size: 1rem;
}

.notify-attach-blocked p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.notify-attach-blocked code {
  overflow-wrap: anywhere;
}

.notify-attach-blocked a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* The download log, kept closed under the explanation. */
.notify-attach-preview-more {
  width: 100%;
}

.notify-attach-preview-more summary {
  cursor: pointer;
  font-size: 0.85rem;
}

.notify-attach-preview-more pre {
  margin-top: 0.5rem !important;
}

.notify-attach-preview-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
}

.notify-attach-preview-none i.material-icons {
  font-size: 3rem;
}

#notify .notify-attach-error,
.details-step .notify-attach-error {
  display: block;
  margin: 0.25rem 0.4rem;
  font-size: 0.85rem;
  color: var(--form-error-text);
}

/* Under the Apprise URL rows: whether the untagged services get it too. */
#notify .notify-url-untagged {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  color: var(--select-text);
  font-size: 1rem;
  cursor: pointer;
}

#notify .notify-url-untagged[hidden] {
  display: none;
}

.notify-form-section {
  width: 100%;
  min-width: 0;
  margin: 0.55rem 0 0;
  padding: 0.8rem;
  border: 1px solid var(--select-border);
  border-radius: 10px;
  box-sizing: border-box;
  background: var(--dialog-surface-raised);
}

.notify-delivery-options .notify-top-row,
.notify-message-fields .row {
  margin-top: 0;
}

/* Process As and Type keep room for their longest choice (such as MARKDOWN),
   so Tags moves to its own line before squeezing them. */
@media (min-width: 601px) {
  #notify .notify-top-row {
    display: flex;
    flex-wrap: wrap;
  }

  #notify .notify-top-row>.input-field.col {
    margin-left: 0;
    flex: 1 0 11rem;
    max-width: 15rem;
  }

  #notify .notify-top-row>.input-field.col:last-child {
    flex: 1 1 20rem;
    max-width: none;
  }
}

#notify .notify-form-section .select-wrapper input.select-dropdown,
#notify .notify-form-section .chips,
#notify .notify-template-row input,
#notify .notify-message-fields input,
#notify .notify-message-fields textarea,
#notify #reminder-form input:not([type="checkbox"]),
#reminders .reminder-view-zone input {
  border: 1px solid var(--select-border) !important;
  border-radius: 7px !important;
  box-sizing: border-box;
  background: var(--select-bg);
  color: var(--select-text);
}

#notify .notify-form-section .select-wrapper input.select-dropdown,
#notify .notify-message-fields input,
#notify #reminder-form input:not([type="checkbox"]),
#reminders .reminder-view-zone input {
  min-height: 2.75rem;
  height: 2.75rem;
}

#notify #reminder-form input:not([type="checkbox"]),
#reminders .reminder-view-zone input {
  width: 100%;
  margin: 0;
  padding: 0 0.65rem;
}

#notify #reminder-form input:not([type="checkbox"]):focus,
#reminders .reminder-view-zone input:focus {
  border-color: var(--select-border-hover) !important;
  box-shadow: 0 0 0 3px var(--select-focus-ring) !important;
}

#notify .notify-form-section .chips {
  min-height: 2.75rem;
  margin: 0;
  padding: 0 0.65rem;
}

/* Without a configuration there are no tags to pick, so the field is greyed out. */
#notify .notify-form-section .chips.notify-tags-unavailable,
#notify label[for="id_tag"]:has(+ .chips.notify-tags-unavailable) {
  opacity: 0.5;
  pointer-events: none;
}

/* The Tags box is also an input-field, whose row padding would push the tags
   below the middle; flexbox already centres them. */
#notify .notify-form-section .chips.input-field {
  padding-top: 0;
}

#notify .notify-form-section .chips input {
  height: 2.25rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent;
}

#notify .notify-message-fields input,
#notify .notify-message-fields textarea {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
}

#notify .notify-message-fields textarea {
  resize: vertical;
}

.notify-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.notify-section-title {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.notify-section-title>i.material-icons {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: var(--mobile-app-accent);
  font-size: 1.25rem;
}

.notify-section-heading h6,
.notify-section-heading p {
  margin: 0;
}

.notify-section-heading h6,
.notify-section-heading-label {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
}

.notify-section-heading p,
.notify-template-empty {
  color: var(--notify-log-muted);
  font-size: 0.82rem;
}

.notify-template-add {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.25rem;
  border: 1px solid var(--select-border);
  border-radius: 8px;
}

.notify-template-add:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.notify-template-add i.material-icons,
.notify-template-remove i.material-icons {
  font-size: 1.2rem;
}

.notify-template-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.notify-template-empty {
  margin: 0.15rem 0;
}

.notify-template-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 1.5fr) 2.5rem;
  gap: 0.55rem;
  align-items: end;
  padding: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.notify-template-row.is-included {
  border-color: var(--notify-log-success-border);
  background: var(--notify-log-success-bg);
}

.notify-template-key-field,
.notify-template-value-field,
.details-field {
  min-width: 0;
}

.notify-template-key-field label,
.notify-template-value-field label,
.details-field>label,
.details-step-field>label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--notify-log-muted);
  font-size: 0.75rem;
}

#notify .notify-template-row input,
.details-step input:not([type="checkbox"]),
.details-step select,
.list-search input {
  width: 100%;
  height: 2.75rem;
  margin: 0;
  padding: 0 0.65rem !important;
  border: 1px solid var(--select-border) !important;
  border-radius: 7px !important;
  box-sizing: border-box !important;
  background: var(--select-bg);
  color: var(--select-text);
  font-family: monospace;
}

#notify .notify-template-row input:focus,
.details-step input:not([type="checkbox"]):focus,
.details-step select:focus,
.list-search input:focus {
  border-color: var(--select-border-hover) !important;
  box-shadow: 0 0 0 3px var(--select-focus-ring) !important;
}

/* A field whose value is not in the form its service expects. */
.details-step input.is-invalid:not([type="checkbox"]) {
  border-color: var(--form-error-border) !important;
}

.details-field-error:not([hidden]) {
  display: block;
  margin-top: 0.25rem;
}

/* Under a list of several kinds of entry: which mark means what, and how
   entries without one were read. */
.details-field-hint:not([hidden]) {
  display: block;
  margin-top: 0.25rem;
  color: var(--notify-log-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

#notify .notify-template-value-control input,
.details-step .notify-template-value-control input,
.list-search .notify-template-value-control input {
  padding-right: 2.8rem !important;
}

/* Apprise Details builder: three numbered steps, a service list, fields. */
.details-step {
  margin-bottom: 1.5rem;
}

.details-step-title {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 0.9rem;
  font-size: 1.25rem;
}

.details-step-number {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--mobile-app-accent);
  color: var(--select-bg);
  font-size: 1rem;
  font-weight: 600;
}

.details-step-field {
  margin-bottom: 0.9rem;
}

.details-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.45rem;
  max-height: 22rem;
  margin: 0 0 0.9rem;
  padding: 0.2rem;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
}

.details-services>li {
  min-width: 0;
}

/* Listed with :focus too, so Materialize's bright teal fill for a focused
   button never covers the text while a service is clicked. */
.details-service,
.details-service:focus {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  height: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--select-border);
  border-radius: 7px;
  background: var(--select-bg);
  color: var(--select-text);
  text-align: left;
  cursor: pointer;
}

.details-service:hover,
.details-service:focus-visible {
  border-color: var(--mobile-app-accent);
}

/* A service being clicked already looks picked. */
.details-service[aria-pressed="true"],
.details-service:active {
  border-color: var(--mobile-app-accent);
  background: var(--mobile-app-accent-soft);
}

.details-service-name {
  font-weight: 600;
}

/* With every service listed, a small mark before the name says whether it works. */
.details-service .details-service-status {
  margin-right: 0.25rem;
  font-size: 1rem;
  vertical-align: -0.15em;
}

.details-service .details-service-status.is-enabled {
  color: var(--toast-success-border);
}

.details-service .details-service-status.is-disabled {
  color: var(--form-error-border);
}

.details-service-schemas {
  overflow-wrap: anywhere;
}

/* A turned-off service's notice keeps the shared notice box with a red mark. */
#details-disabled .notify-target-guidance-title {
  flex-wrap: wrap;
  color: inherit;
}

#details-disabled .notify-target-guidance-title i.material-icons {
  font-size: 1.15rem;
  color: var(--form-error-border);
}

#details-disabled p {
  margin: 0.25rem 0 0;
}

/* The URL Builder button sits at the right end of the title row, and drops
   below the title once the notice gets narrow. */
#details-disabled-builder {
  margin-left: auto;
}

#details-disabled code+code {
  margin-left: 0.35rem;
}

.details-service-schemas code {
  margin-right: 0.35rem;
  color: var(--notify-log-muted);
  font-size: 0.8rem;
}

.details-required {
  color: var(--form-error-text);
}

.details-url-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.details-url-row input {
  flex: 1 1 auto;
  min-width: 0;
}

/* The themes colour the border of a greyed out button; Materialize gives it none. */
.details-step .btn[disabled] {
  border: 1px solid;
}

.details-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.9rem 1.2rem;
  margin-bottom: 0.9rem;
}

.details-group,
.details-map {
  border: 1px solid var(--select-border);
  border-radius: 8px;
}

.details-group {
  margin-bottom: 0.9rem;
  padding: 0.5rem 0.7rem;
}

.details-group summary {
  margin-bottom: 0.4rem;
  font-weight: 600;
  cursor: pointer;
}

.details-map {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.4rem;
}

.details-map legend {
  padding: 0 0.35rem;
  color: var(--notify-log-muted);
  font-size: 0.75rem;
}

.details-switch {
  margin-top: 0.6rem;
}

@media only screen and (max-width: 600px) {

  .details-fields,
  .details-services {
    grid-template-columns: minmax(0, 1fr);
  }

  .details-url-row {
    flex-wrap: wrap;
  }

  .details-url-row input {
    flex-basis: 100%;
  }
}

.notify-template-value-control .value-visibility-toggle,
.notify-template-value-control .value-visibility-toggle:hover,
.notify-template-value-control .value-visibility-toggle:focus,
.notify-template-value-control .value-visibility-toggle:active {
  /* Centred without a transform, which a tooltip would not follow. */
  top: calc(50% - 1rem);
  right: 0.35rem;
  height: 2rem;
  line-height: 2rem;
  background-color: var(--select-bg) !important;
}

.notify-template-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid;
  border-radius: 7px;
}

#notify .row,
#notify .row .input-field:where(:not(.select-wrapper)) {
  margin-top: 0.2em;
  margin-bottom: 0;
  padding-bottom: 0;
  padding-top: 0.3rem;
}

/* Materialize offsets rows to balance page-level column padding. The notify
   form is already inside a padded column, so keep its rows within the panel. */
#notify form,
#notify .row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#notify .row {
  margin-right: 0;
  margin-left: 0;
}

.btn-clear-form {
  min-height: 2.8rem;
  height: 2.8rem;
  width: auto;
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  line-height: 1;
  font-weight: 500;
}

.btn-clear-form .btn-text {
  display: block;
  text-align: center;
  font-size: 0.95rem;
  color: inherit;
  max-width: none;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.15;
}

.btn-clear-form i {
  margin: 0;
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.85;
}

.notify-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

#notify .notify-top-row .select-wrapper input.select-dropdown {
  font-size: 1.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#notify .notify-top-row .dropdown-content.select-dropdown {
  overflow-x: hidden;
}

#notify .autocomplete-content,
.details-services {
  scrollbar-width: thin;
  scrollbar-color: var(--review-autocomplete-scroll-thumb) var(--review-autocomplete-scroll-track);
}

#notify .autocomplete-content {
  height: auto !important;
  max-height: min(18rem, 52vh);
  padding: 0.18rem 0.32rem 0.34rem;
  box-sizing: border-box;
}

#notify .autocomplete-content::-webkit-scrollbar,
.details-services::-webkit-scrollbar {
  width: 0.55rem;
}

#notify .autocomplete-content::-webkit-scrollbar-track,
.details-services::-webkit-scrollbar-track {
  background: var(--review-autocomplete-scroll-track);
  border-radius: 999px;
}

#notify .autocomplete-content::-webkit-scrollbar-thumb,
.details-services::-webkit-scrollbar-thumb {
  background: var(--review-autocomplete-scroll-thumb);
  border: 2px solid var(--review-autocomplete-scroll-track);
  border-radius: 999px;
}

#notify .notify-top-row .dropdown-content.select-dropdown li>span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#notify .autocomplete-content li:not(.notify-tag-option-exact)>span {
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

#notify .autocomplete-content li:not(.notify-tag-option-exact):hover>span,
#notify .autocomplete-content li:not(.notify-tag-option-exact).active>span,
#notify .autocomplete-content li:not(.notify-tag-option-exact).selected>span {
  background: var(--review-autocomplete-hover-bg) !important;
  color: var(--review-autocomplete-hover-text) !important;
}

#notify .autocomplete-content li.notify-tag-option-exact {
  display: inline-flex;
  align-items: center;
  clear: none;
  width: auto;
  min-height: 0;
  margin: -0.08rem 0.22rem 0.46rem 0;
  background: transparent !important;
  line-height: 1;
  vertical-align: top;
}

#notify .autocomplete-content li.notify-tag-option-exact:hover,
#notify .autocomplete-content li.notify-tag-option-exact.active,
#notify .autocomplete-content li.notify-tag-option-exact.selected {
  background: transparent !important;
}

#notify .autocomplete-content li.notify-tag-option-exact>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  max-width: 5.5rem;
  padding: 0.32rem 0.56rem;
  border: 1px solid var(--review-priority-option-ring);
  border-radius: 999px;
  background: var(--review-priority-option-bg) !important;
  color: var(--review-priority-option-text) !important;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.96;
}

#notify .autocomplete-content li.notify-tag-option-exact:hover>span,
#notify .autocomplete-content li.notify-tag-option-exact.active>span {
  background: var(--review-priority-option-hover-bg) !important;
  color: var(--review-priority-option-hover-text) !important;
}

#notify .autocomplete-content .notify-tag-option-token-text {
  display: none;
}

@media (max-width: 992px) {

  #notify .notify-form-actions .btn,
  #notify .notify-form-actions .btn-clear-form,
  #config .config-toolbar .config-url-builder-btn,
  #config .config-form-actions .btn {
    min-height: 2.7rem;
    height: 2.7rem;
    line-height: 2.7rem;
  }

  #notify .notify-top-row .select-wrapper input.select-dropdown {
    font-size: 1.02rem;
  }
}

@media (max-width: 600px) {
  .notify-template-row {
    grid-template-columns: minmax(0, 1fr) 2.5rem;
  }

  .notify-template-key-field,
  .notify-template-value-field {
    grid-column: 1;
  }

  .notify-template-remove {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  /* On a phone the picked value takes its own line, above the buttons. */
  #reminder-picker .reminder-picker-footer {
    justify-content: flex-end;
  }

  #reminder-picker .reminder-picker-value {
    flex: 1 1 100%;
  }

  /* On a phone the quick choices sit above the calendar, two to a row. */
  #reminder-picker .reminder-picker-main {
    flex-direction: column;
  }

  #reminder-picker .reminder-picker-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--dialog-border);
  }

  #reminder-picker .reminder-picker-heading {
    grid-column: 1 / -1;
  }

  /* Web address rows keep Preview and Remove beside the address. */
  .notify-template-row.notify-attach-row {
    grid-template-columns: minmax(0, 1fr) 2.5rem 2.5rem;
  }

  .notify-template-row.notify-attach-row .notify-template-remove {
    grid-column: 3;
  }

  .notify-template-row.notify-url-row {
    grid-template-columns: minmax(0, 1fr) 2.5rem;
  }

  .notify-template-row.notify-url-row .notify-template-remove {
    grid-column: 2;
  }

  /* Three buttons wrap onto two rows rather than squeeze their labels. */
  #notify .notify-form-actions {
    flex-wrap: wrap;
  }

  #notify .notify-form-actions .btn,
  #notify .notify-form-actions .btn-clear-form {
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 0;
    padding: 0 0.6rem;
    font-size: 0.82rem;
  }

  #notify .notify-form-actions .btn-clear-form .btn-text {
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .notify-form-section {
    padding: 0.55rem;
  }

  .notify-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .notify-template-add {
    justify-content: center;
  }

  .notify-attachments-buttons .notify-template-add {
    flex: 1 1 0;
  }

  #notify .notify-top-row>.input-field.col {
    width: 100%;
    margin-left: 0;
  }

  #notify .notify-form-section .row>.input-field.col {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  #notify .notify-form-actions {
    flex-direction: column;
  }

  #notify .notify-form-actions .btn,
  #notify .notify-form-actions .btn-clear-form {
    width: 100%;
  }
}

/* SweetAlert2 – notification summary and logs */
.swal2-popup.notify-log-popup .swal2-html-container,
.swal2-popup.apprise-popup--task .swal2-html-container:has(.notify-live-feed) {
  margin-top: 0.75rem;
  max-height: min(67vh, 38rem);
}

.swal2-popup .notify-summary {
  padding: 0.7rem 0.9rem;
  margin: 0 auto 0.8rem;
  border: 1px solid var(--notify-log-border);
  border-radius: 0.55rem;
  color: var(--notify-log-text);
  background: var(--dialog-surface-raised);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
}

.swal2-popup.notify-log-popup--success .notify-summary {
  border-color: var(--notify-log-success-border);
  background: var(--notify-log-success-bg);
}

.swal2-popup.notify-log-popup--warning .notify-summary {
  border-color: var(--notify-log-warning-border);
  background: var(--notify-log-warning-bg);
}

.swal2-popup.notify-log-popup--error .notify-summary {
  border-color: var(--notify-log-error-border);
  background: var(--notify-log-error-bg);
}

.swal2-popup .notify-live-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--notify-log-status-border);
  border-radius: 0.55rem;
  color: var(--notify-log-text);
  background: var(--notify-log-status-bg);
  font-weight: 600;
  text-align: left;
}

.swal2-popup .notify-live-pulse {
  position: relative;
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mobile-app-accent);
}

.swal2-popup .notify-live-pulse::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  content: '';
  animation: notify-live-pulse 1.6s ease-out infinite;
  will-change: opacity, transform;
}

.swal2-popup .notify-live-count {
  padding: 0.15rem 0.5rem;
  margin-left: auto;
  border: 1px solid var(--notify-log-status-border);
  border-radius: 999px;
  color: var(--notify-log-muted);
  background: var(--dialog-surface);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.swal2-popup .notify-log-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.45rem;
}

.swal2-popup .notify-log-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0 0.7rem;
  border: 1px solid var(--notify-log-border);
  border-radius: 0.45rem;
  color: var(--mobile-app-accent);
  background: var(--dialog-surface-raised);
  line-height: 2.25rem;
}

.swal2-popup .notify-log-copy i.material-icons {
  margin: 0;
  font-size: 1.1rem;
}

@keyframes notify-live-pulse {
  from {
    opacity: 0.55;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(2.7);
  }
}

.swal2-popup .notify-log-panel {
  margin: 0 auto 0.5rem;
  padding: 0.35rem;
  max-height: min(38rem, 58vh);
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--notify-log-border);
  border-radius: 0.6rem;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: var(--notify-log-muted) var(--notify-log-bg);
}

/* Keep the progress dialog still while new log rows fill its scroll area. */
.swal2-popup .notify-live-feed .notify-log-panel {
  height: clamp(8rem, 42vh, 24rem);
  height: clamp(8rem, 42dvh, 24rem);
  box-sizing: border-box;
  contain: layout paint;
}

.swal2-popup .notify-log-panel ul.logs {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

/* log lines */
.swal2-popup .notify-log-panel ul.logs li {
  display: grid;
  grid-template-columns: 12rem 5.25rem minmax(12rem, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.35rem;
  color: var(--notify-log-text);
  background: var(--notify-log-row-bg);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.swal2-popup .notify-live-feed .notify-log-row {
  animation: notify-log-row-enter 180ms ease-out both;
}

@keyframes notify-log-row-enter {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swal2-popup .notify-log-panel ul.logs li:nth-child(even) {
  background: var(--notify-log-row-alt-bg);
}

.swal2-popup .notify-log-panel ul.logs li .log_time,
.swal2-popup .notify-log-panel ul.logs li .log_level {
  flex-shrink: 0;
}

.swal2-popup .notify-log-panel .log_time {
  color: var(--notify-log-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.swal2-popup .notify-log-panel .log_level {
  display: inline-flex;
  justify-content: center;
  min-width: 4.75rem;
  padding: 0.08rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.swal2-popup .notify-log-panel .log_message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.swal2-popup .notify-log-panel .log_service {
  padding: 0.08rem 0.45rem;
  border: 1px solid var(--notify-log-border);
  border-radius: 0.3rem;
  color: var(--notify-log-muted);
  background: var(--dialog-surface-raised);
  font-size: 0.72rem;
  white-space: nowrap;
}

.swal2-popup .notify-live-empty {
  margin: 1.5rem 1rem;
  color: var(--notify-log-muted);
  text-align: center;
  font-style: italic;
}

.swal2-popup .notify-live-empty[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .swal2-popup .notify-log-panel ul.logs li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.6rem;
  }

  .swal2-popup .notify-log-panel .log_level {
    grid-column: 2;
    grid-row: 1;
  }

  .swal2-popup .notify-log-panel .log_message {
    grid-column: 1 / -1;
  }

  .swal2-popup .notify-log-panel .log_service {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {

  .swal2-popup .notify-live-pulse::after,
  .swal2-popup .notify-live-feed .notify-log-row {
    animation: none;
  }
}

/* =========================================
Apprise Configuration Editor (Grid Overlay)
========================================= */
.apprise-config-editor {
  display: grid;
  position: relative;
  margin-top: 0.5rem;
  /* An editor dragged wider than its card scrolls inside it instead of
     pushing the page sideways. */
  overflow-x: auto;
}

/* Shared styles for perfect alignment */
.apprise-config-editor textarea,
.apprise-config-highlight {
  grid-area: 1 / 1;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 14px !important;
  line-height: 22px !important;
  letter-spacing: 0px !important;
  tab-size: 2;
  padding: 15px !important;
  box-sizing: border-box !important;
  border-radius: 4px;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  /* A long URL fills each line to the edge instead of jumping to the next
     line early and leaving a gap. Both layers share it, so they stay aligned. */
  word-break: break-all !important;
  overflow-y: hidden !important;
  margin: 0 !important;
  min-height: 250px;
}

/* The editor can be dragged taller and wider, but never smaller than it starts:
   the full width of its card and the minimum height above. Sizes are left
   without !important so the size a drag sets can take effect. */
.apprise-config-editor textarea {
  width: 100%;
  min-width: 100%;
  height: initial;
  background: transparent !important;
  color: transparent !important;
  z-index: 2;
  resize: both;
  border: 1px solid #444 !important;
}

.apprise-config-editor .apprise-config-highlight {
  z-index: 1;
  pointer-events: none;
  width: 100% !important;
  height: 100% !important;
  border: 1px solid transparent !important;
}

.apprise-config-highlight code {
  font-family: inherit !important;
  font-size: inherit !important;
  background: transparent !important;
  padding: 0 !important;
  color: inherit;
}

.apprise-config-highlight code,
.apprise-config-highlight .hljs {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.config-format-field {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.config-format-field .select-wrapper {
  max-width: 10rem;
  width: 100%;
}

.config-format-field label[for="id_format"] {
  font-size: 0.9rem;
}

/* =========================================
Config Page Toolbar (URL Builder)
========================================= */

.config-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.config-url-builder-btn {
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.config-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* Mobile layout */
@media (max-width: 600px) {
  .config-toolbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .config-format-field {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 auto;
  }

  .config-format-field .select-wrapper {
    max-width: 9rem;
  }

  /* The label text (any locale) is unpredictable in length, so the button
     collapses to just its icon here rather than trying to guess a width
     that fits every translation on the same row as the format select. */
  .config-url-builder-btn {
    flex: 0 0 auto;
    margin-bottom: 0;
    width: 2.6rem;
    min-width: 2.6rem;
    padding: 0;
  }

  .config-url-builder-btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #config .config-toolbar .config-url-builder-btn i.right {
    margin-left: 0;
  }

  #config .config-form-actions .btn {
    width: 100%;
  }
}

/* =========================================
Reminders
========================================= */
#reminders .reminder-notice {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid;
  border-radius: 8px;
}

/* Cards sit side by side only when each is wide enough for its times and
   buttons on one row. */
#reminders .reminder-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 28rem), 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#reminders .reminder-empty {
  margin: 0 0 1rem;
}

#reminders .reminder-empty[hidden] {
  display: none;
}

/* The attachment space alert, on the Reminders tab and in the Reminder section. */
.reminder-space-full {
  margin: 0 0 1rem;
}

.reminder-space-full[hidden] {
  display: none;
}

#reminders .reminder-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  color: var(--reminder-text);
  background-color: var(--reminder-card-bg);
  border: 1px solid var(--reminder-card-border);
  border-left: 4px solid var(--reminder-accent);
  border-radius: 8px;
}

#reminders .reminder-card.is-paused {
  border-left-color: var(--reminder-paused);
}

#reminders .reminder-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-wrap: anywhere;
}

#reminders .reminder-status {
  flex: 0 0 auto;
  padding: 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.5rem;
  color: var(--reminder-accent);
  background-color: var(--reminder-accent-soft);
  border-radius: 1rem;
}

#reminders .reminder-card.is-paused .reminder-status {
  color: var(--reminder-paused);
  background-color: var(--reminder-paused-soft);
}

/* A send that failed is marked in red. */
#reminders .reminder-status.is-failed {
  color: var(--reminder-failed);
  background-color: var(--reminder-failed-soft);
  border: 1px solid var(--reminder-failed);
}

#reminders .reminder-card-line {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

#reminders .reminder-card-label {
  color: var(--reminder-muted);
}

#reminders .reminder-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

/* The card's last row: its times on the left, its buttons on the right.
   It fills the rest of the card, so the times stay under Repeat while the
   buttons sit at the bottom. */
#reminders .reminder-card-footer {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

#reminders .reminder-card-times {
  display: flex;
  flex: 1 1 12rem;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

/* Buttons that drop below the times stay at the right. */
#reminders .reminder-card-footer .reminder-card-actions {
  margin-left: auto;
}

#reminders .reminder-action {
  display: inline-flex;
  flex: 0 0 2.25rem;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 6px;
}

#reminders .reminder-action i.material-icons {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25rem;
  text-align: center;
}

#reminders .reminder-calendar {
  margin-bottom: 1.5rem;
}

/* The delete dialog: the reminder in a small card, read from the left like
   the rest of the dialog, with a line saying what each button removes. */
.swal2-popup.reminder-delete-popup .swal2-html-container {
  padding: 0;
  text-align: left;
}

/* The diagnostics dialog reads left to right, like the code it holds. */
.swal2-popup.reminder-diagnostics-popup .swal2-html-container {
  text-align: left;
}


/* A reminder's diagnostics: shown whole, so only the dialog scrolls. Long
   lines wrap rather than scroll sideways. The theme colours the code. */
.reminder-diagnostics {
  margin: 0.75rem 0 0;
  border: 1px solid var(--select-border);
  border-radius: 6px;
  overflow: hidden;
}

.reminder-diagnostics code {
  display: block;
  padding: 0.75rem;
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The link to how to read them, then the switch between the redacted and
   whole diagnostics: small, at the left of the buttons' row. On a narrow
   screen they wrap onto a line of their own above the buttons. */
.swal2-popup.reminder-diagnostics-popup .swal2-actions {
  flex-wrap: wrap;
}

.reminder-diagnostics-help,
.reminder-diagnostics-redact {
  order: -1;
  font-size: 0.8rem;
}

.reminder-diagnostics-redact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  color: var(--select-text);
  cursor: pointer;
}

/* Keys stand apart from the coloured values. */
.reminder-diagnostics .hljs-attr {
  font-weight: 600;
}

.reminder-delete-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--dialog-border);
  border-left: 4px solid var(--reminder-accent);
  border-radius: 8px;
  background: var(--dialog-surface-raised);
}

.reminder-delete-card i.material-icons {
  color: var(--reminder-accent);
}

.reminder-delete-card div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reminder-delete-card span {
  color: var(--notify-log-muted);
  font-size: 0.9rem;
}

.reminder-delete-note {
  margin: 0.75rem 0 0;
  color: var(--notify-log-muted);
  font-size: 0.9rem;
}

/* A small menu below a button, such as Edit this time or Edit the series. */
.reminder-menu {
  display: block;
  position: absolute;
  z-index: 1001;
  min-width: 12rem;
  width: auto;
  height: auto;
  padding: 0.3rem;
  opacity: 1;
  overflow: hidden;
}

/* Materialize makes dropdown items tall and paints them light grey on hover,
   which would show as a bar around the shorter buttons. */
.reminder-menu li {
  min-height: 0;
  line-height: normal;
  background: transparent !important;
}

.reminder-menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.3rem;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}

.reminder-menu button i.material-icons {
  font-size: 1.15rem;
  color: inherit;
}

/* The calendar never makes the page scroll sideways. */
#reminders .reminder-calendar {
  max-width: 100%;
  overflow-x: clip;
}

/* A reminder time clicked in the week or month view. */
#reminders .fc .fc-event.is-picked {
  outline: 2px solid var(--reminder-accent);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--fc-highlight-color);
}

/* The reminders of the day or hour picked, under the calendar. */
#reminders .reminder-selection {
  margin-top: 1rem;
}

#reminders .reminder-selection[hidden] {
  display: none;
}

#reminders .reminder-selection-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--reminder-text);
  font-weight: 500;
}

/* Everything listed is on the day in the heading. */
#reminders .reminder-selection .fc-list-day {
  display: none;
}

#reminders .fc .fc-toolbar {
  flex-wrap: wrap;
  gap: 0.5rem;
}

#reminders .fc .fc-toolbar-title {
  font-size: 1.25rem;
}

/* Dates and reminder names are links, but should read as plain text. */
#reminders .fc a {
  color: var(--reminder-text) !important;
}

/* The list shows each reminder time as a coloured row with its buttons. */
#reminders .fc .fc-list-table {
  border-collapse: separate;
  border-spacing: 0 0.35rem;
}

#reminders .fc .fc-list-event td {
  vertical-align: middle;
  background: var(--reminder-event-bg);
  border: 0;
}

#reminders .fc .fc-list-event .fc-list-event-time {
  width: 7rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--reminder-event-accent);
  border-radius: 7px 0 0 7px;
  font-weight: 600;
}

#reminders .fc .fc-list-event .fc-list-event-graphic {
  display: none;
}

#reminders .fc .fc-list-event .fc-list-event-title {
  border-radius: 0 7px 7px 0;
}

/* Rows act only through their buttons. */
#reminders .fc .fc-list-event {
  cursor: default;
}

#reminders .fc .fc-list-event:hover td {
  background: var(--reminder-event-hover);
}

/* A paused reminder turns grey (see the theme files) and faded, apart from its buttons. */
#reminders .fc .fc-list-event.is-paused .fc-list-event-time {
  color: var(--notify-log-muted);
}

#reminders .fc .fc-list-event.is-paused .reminder-event-text {
  opacity: 0.6;
}

#reminders .fc .fc-list-event.is-paused .reminder-status {
  color: var(--notify-log-muted);
  background-color: transparent;
  border: 1px solid var(--notify-log-muted);
}

/* Play stands out on a paused reminder, as it is what resumes it. */
#reminders .reminder-action.reminder-action-resume {
  color: var(--reminder-accent);
  background-color: var(--reminder-accent-soft);
  border-color: var(--reminder-accent);
}

#reminders .reminder-action.reminder-action-resume:hover,
#reminders .reminder-action.reminder-action-resume:focus-visible {
  color: var(--reminder-card-bg);
  background-color: var(--reminder-accent);
}

#reminders .reminder-action.reminder-action-resume i.material-icons {
  color: inherit;
}

#reminders .reminder-event-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

#reminders .reminder-event-text {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

#reminders .reminder-event-summary {
  color: var(--reminder-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

#reminders .reminder-event-actions {
  margin-top: 0;
  padding-top: 0;
}

/* Week and month views colour each reminder the same way. */
#reminders .fc .fc-event[class*="reminder-color-"] {
  --fc-event-bg-color: var(--reminder-event-accent);
  --fc-event-border-color: var(--reminder-event-accent);
}

/* A failed send shows a red dot. */
#reminders .fc .reminder-event-past.is-failed {
  --fc-event-bg-color: var(--reminder-failed);
  --fc-event-border-color: var(--reminder-failed);
}

#reminders .fc .reminder-event-past:not(.fc-list-event) {
  opacity: 0.75;
}

/* In the list only the text fades, so the result and buttons stay clear. */
#reminders .fc .fc-list-event.reminder-event-past .fc-list-event-time {
  color: var(--reminder-muted);
}

#reminders .fc .fc-list-event.reminder-event-past .reminder-event-text {
  opacity: 0.75;
}

#reminders .reminder-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* The section header opens and closes the Reminders section. */
#notify-reminder .reminder-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

#notify-reminder .reminder-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--select-focus-ring);
}

#notify-reminder .reminder-toggle .reminder-toggle-arrow {
  margin-left: auto;
  color: var(--notify-log-muted);
  transition: transform 0.2s ease;
}

#notify-reminder .reminder-toggle:hover .reminder-toggle-arrow,
#notify-reminder .reminder-toggle:focus-visible .reminder-toggle-arrow {
  color: var(--mobile-app-accent);
}

#notify-reminder .reminder-toggle[aria-expanded="true"] .reminder-toggle-arrow {
  transform: rotate(180deg);
}

#notify-reminder .reminder-panel {
  padding-top: 0.5rem;
}

#notify-reminder .reminder-panel[hidden] {
  display: none;
}

/* A reminder just saved is outlined for a moment on the calendar. */
#reminders .fc .reminder-event-saved td {
  box-shadow: inset 0 2px 0 var(--mobile-app-accent), inset 0 -2px 0 var(--mobile-app-accent);
}

#reminders .fc .reminder-event-saved .fc-list-event-title {
  box-shadow: inset 0 2px 0 var(--mobile-app-accent), inset 0 -2px 0 var(--mobile-app-accent), inset -2px 0 0 var(--mobile-app-accent);
}

/* "Show times in" sits above the calendar, with a button back to the browser's timezone. */
#reminders .reminder-view-zone {
  max-width: 25rem;
  margin: 0 0 1rem;
}

#reminders .reminder-view-zone-row {
  display: flex;
  gap: 0.5rem;
}

#reminders .reminder-view-zone-row .reminder-combobox {
  flex: 1 1 auto;
  min-width: 0;
}

#reminders .reminder-view-zone-reset,
#reminder-form .reminder-holiday-step button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--select-border);
  border-radius: 7px;
  background: var(--select-bg);
  color: var(--mobile-app-accent);
}

#reminders .reminder-view-zone-reset:hover,
#reminders .reminder-view-zone-reset:focus-visible,
#reminder-form .reminder-holiday-step button:hover,
#reminder-form .reminder-holiday-step button:focus-visible {
  border-color: var(--select-border-hover);
}

#reminders .reminder-view-zone-reset:disabled,
#reminder-form .reminder-holiday-step button:disabled {
  opacity: 0.45;
  cursor: default;
}

#reminders .reminder-view-zone-reset i.material-icons,
#reminder-form .reminder-holiday-step button i.material-icons {
  color: inherit;
}

/* Select all, none and invert, small beside the Days and Months labels. */
#reminder-form .reminder-pick-actions {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

#reminder-form .reminder-pick-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid var(--select-border);
  border-radius: 6px;
  background: var(--select-bg);
  color: var(--notify-log-muted);
  line-height: 1;
}

#reminder-form .reminder-pick-actions button:hover,
#reminder-form .reminder-pick-actions button:focus-visible {
  border-color: var(--select-border-hover);
  color: var(--mobile-app-accent);
}

#reminder-form .reminder-pick-actions button i.material-icons {
  color: inherit;
  font-size: 1rem;
}

/* The start's picker, with a holiday's year buttons beside it. */
#reminder-form .reminder-start-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

#reminder-form .reminder-start-row .reminder-picker-anchor {
  flex: 1 1 auto;
  min-width: 0;
}

#reminder-form .reminder-holiday-step {
  display: flex;
  gap: 0.25rem;
}

#reminder-form .reminder-holiday-step[hidden] {
  display: none;
}

/* The All view lists every reminder as a card, without the date controls. */
#reminder-calendar:has(.reminder-all-view) .fc-header-toolbar .fc-toolbar-chunk:not(:last-child) {
  display: none;
}

#reminder-calendar:has(.reminder-all-view) .fc-header-toolbar .fc-toolbar-chunk:last-child {
  margin-left: auto;
}

#reminder-calendar .reminder-all-view .reminder-list {
  margin: 0;
}

/* The empty box spans both card columns on a wide screen. */
#reminder-calendar .reminder-all-view .reminder-all-empty {
  grid-column: 1 / -1;
}

/* Cards open the reminder when clicked. */
#reminders .reminder-card.is-clickable {
  cursor: pointer;
}

/* Labels that are not tied to one field, such as Days, read like the others. */
#reminder-form .reminder-field-label,
#reminders .reminder-view-zone label {
  display: block;
  margin: 0 0 0.2rem 0;
  color: var(--mobile-app-accent);
  font-size: 1rem;
  line-height: 1.2;
}

/* Weekdays and months are pills that light up when chosen. */
#reminder-form .reminder-days-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

#reminder-form .reminder-days-list label {
  display: inline-flex;
}

#reminder-form .reminder-days-list [type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#reminder-form .reminder-days-list [type="checkbox"]+span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  height: 2.1rem;
  padding: 0 0.75rem;
  color: var(--reminder-text);
  font-size: 0.9rem;
  line-height: 1;
  background: var(--select-bg);
  border: 1px solid var(--select-border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

/* Materialize draws its own check box before the text; pills do not need it. */
#reminder-form .reminder-days-list [type="checkbox"]+span::before,
#reminder-form .reminder-days-list [type="checkbox"]+span::after {
  display: none;
}

#reminder-form .reminder-days-list [type="checkbox"]:checked+span {
  color: var(--mobile-app-accent);
  font-weight: 600;
  background: var(--reminder-accent-soft);
  border-color: var(--mobile-app-accent);
}

#reminder-form .reminder-days-list [type="checkbox"]:focus-visible+span {
  box-shadow: 0 0 0 3px var(--select-focus-ring);
}

/* "Make recurring" uses the same switch as the Review tab's filter. */
#reminder-form .reminder-recurring-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--reminder-text);
  font-size: 1rem;
  cursor: pointer;
}

/* Why the switch is off while one time of a series is changed. */
#reminder-form .reminder-span .reminder-hint {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  color: var(--reminder-muted);
  font-size: 0.85rem;
}

#reminder-form .reminder-span .reminder-hint[hidden] {
  display: none;
}

#reminder-form .reminder-recurring-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Starts, the "Make recurring" switch and Ends on one line, wrapping on a phone. */
#reminder-form .reminder-span {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 1.5rem;
}

/* Starts and Ends share what the switch leaves of the row, each wide enough
   for a full date and time; when they do not fit, Ends moves to a new line. */
#reminder-form .reminder-span-field {
  flex: 1 1 17.5rem;
  min-width: 0;
}

/* A holiday's start also holds its two year buttons. */
#reminder-form .reminder-span-field:has(.reminder-holiday-step:not([hidden])) {
  flex-basis: 24rem;
}

/* The switch lines up with the fields beside it, below their labels. */
#reminder-form .reminder-recurring {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 1.95rem;
}

@media (max-width: 600px) {

  /* Stacked on a phone, the dates fill the width and the switch needs no gap above it. */
  #reminder-form .reminder-span-field {
    flex-basis: 100%;
    max-width: none;
  }

  #reminder-form .reminder-recurring {
    margin-top: 0.25rem;
  }

  /* Narrower year buttons leave a holiday's date and time room to show in full. */
  #reminder-form .reminder-holiday-step button {
    width: 2.25rem;
  }
}

/* "Every [x] [unit]" and the drift side by side, wrapping on a phone. */
#reminder-form .reminder-every {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

#reminder-form .reminder-every>.input-field {
  margin-top: 0;
}

/* Each keeps the width its controls need rather than stretching across. */
#reminder-form .reminder-every-main,
#reminder-form .reminder-drift {
  flex: 0 1 auto;
  min-width: 0;
}

/* "Every [x] [unit]" on one line. */
#reminder-form .reminder-every-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

#reminder-form .reminder-every-controls .reminder-interval {
  flex: 0 0 5.5rem;
  width: 5.5rem;
}

#reminder-form .reminder-every-controls .reminder-unit {
  flex: 0 1 11rem;
  width: 11rem;
  min-width: 0;
}

/* The drift can be a long, negative number, and its units are shorter. */
#reminder-form .reminder-drift .reminder-interval {
  flex-basis: 8rem;
  width: 8rem;
}

#reminder-form .reminder-drift .reminder-unit {
  flex-basis: 9rem;
  width: 9rem;
}

/* Rows laid out with flex still hide when the schedule does not use them. */
#reminder-form [hidden] {
  display: none !important;
}

/* A text field with a list of matches below it, such as the timezone. */
#reminder-form .reminder-combobox,
#reminders .reminder-view-zone .reminder-combobox {
  position: relative;
}

#reminder-form .reminder-combobox-list[hidden],
#reminders .reminder-view-zone .reminder-combobox-list[hidden] {
  display: none !important;
}

#reminder-form .reminder-combobox-list,
#reminders .reminder-view-zone .reminder-combobox-list {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  width: 100%;
  max-height: min(18rem, 52vh);
  margin: 0.2rem 0 0;
  overflow-y: auto;
  opacity: 1;
}

#reminder-form .reminder-combobox-list li,
#reminders .reminder-view-zone .reminder-combobox-list li {
  min-height: 0;
  cursor: pointer;
}

#reminder-form .reminder-combobox-list li>span,
#reminders .reminder-view-zone .reminder-combobox-list li>span {
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* Upcoming send times as small cards in a row that wraps when it must. */
#reminder-form .reminder-upcoming-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 0;
}

#reminder-form .reminder-upcoming-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--reminder-card-border);
  border-left: 3px solid var(--reminder-accent);
  border-radius: 7px;
  background: var(--reminder-card-bg);
  line-height: 1.25;
}

#reminder-form .reminder-upcoming-date {
  color: var(--reminder-text);
  font-size: 0.9rem;
  font-weight: 600;
}

#reminder-form .reminder-upcoming-time {
  color: var(--reminder-muted);
  font-size: 0.85rem;
}

/* The card that says a repeating reminder has no more times after these. */
#reminder-form .reminder-upcoming-item.is-end {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  color: var(--reminder-muted);
  font-size: 0.85rem;
  border-style: dashed;
  border-left: 1px dashed var(--reminder-card-border);
  background: transparent;
}

#reminder-form .reminder-upcoming-item.is-end i.material-icons {
  font-size: 1.1rem;
}

/* A field that needs fixing is outlined the same way as a missing message body. */
#notify #reminder-form input.invalid {
  border-color: rgba(255, 183, 77, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(255, 183, 77, 0.55) !important;
}

/* A field that opens the date picker, with its icon inside on the right. */
#reminder-form .reminder-picker-anchor {
  position: relative;
}

#reminder-form .reminder-picker-anchor>i.material-icons {
  position: absolute;
  top: 1.375rem;
  right: 0.7rem;
  transform: translateY(-50%);
  color: var(--notify-log-muted);
  pointer-events: none;
}

/* Room for the icon, so the text never runs under it. Named with "input"
   so it wins over the padding every reminder field gets. */
#notify #reminder-form input.reminder-picker-field {
  padding-right: 2.6rem;
  cursor: pointer;
}

/* The date picker opens in the middle of the screen over a dimmed page:
   quick choices beside a calendar, then the time. */
.reminder-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.55);
}

.reminder-picker-backdrop[hidden] {
  display: none;
}

#reminder-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1003;
  width: min(35rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  color: var(--dialog-text);
  background: var(--dialog-surface);
  border: 1px solid var(--dialog-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

#reminder-picker[hidden] {
  display: none !important;
}

#reminder-picker .reminder-picker-main {
  display: flex;
}

#reminder-picker[data-mode="time"] .reminder-picker-main {
  display: none;
}

#reminder-picker .reminder-picker-quick {
  flex: 0 0 13rem;
  padding: 0.5rem 0;
  border-right: 1px solid var(--dialog-border);
}

#reminder-picker .reminder-picker-heading {
  display: block;
  padding: 0.25rem 0.9rem 0.45rem;
  color: var(--notify-log-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#reminder-picker .reminder-picker-quick button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0.9rem;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

#reminder-picker .reminder-picker-quick button:hover,
#reminder-picker .reminder-picker-quick button:focus-visible {
  background: var(--select-bg);
  outline: none;
}

#reminder-picker .reminder-picker-quick i.material-icons {
  color: var(--notify-log-muted);
  font-size: 1.1rem;
}

#reminder-picker .reminder-picker-day {
  margin-left: auto;
  color: var(--notify-log-muted);
  font-size: 0.8rem;
}

#reminder-picker .reminder-picker-calendar {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem;
}

#reminder-picker .reminder-picker-calendar .air-datepicker {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 0;
}

/* The calendar's month heading stays inside the calendar's width. */
#reminder-picker .reminder-picker-calendar .air-datepicker-nav {
  box-sizing: border-box;
  width: auto;
  min-width: 0;
}

/* Keep the month and year together as one compact heading. */
#reminder-picker .air-datepicker-nav--title {
  align-items: center;
  min-width: 0;
  padding: 0 0.5rem;
  color: var(--dialog-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

#reminder-picker .air-datepicker-nav--title i {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-left: 0.4rem;
  color: var(--notify-log-muted);
  font-family: inherit;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  vertical-align: baseline;
}

#reminder-picker .reminder-picker-time,
#reminder-picker .reminder-picker-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--dialog-border);
}

#reminder-picker[data-mode="time"] .reminder-picker-time {
  border-top: 0;
}

#reminder-picker .reminder-picker-time>i.material-icons {
  color: var(--notify-log-muted);
}

#reminder-picker .reminder-picker-spin {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#reminder-picker .reminder-picker-spin button {
  height: 1.2rem;
  padding: 0;
  color: var(--notify-log-muted);
  line-height: 1.2rem;
  background: none;
  border: 0;
  cursor: pointer;
}

#reminder-picker .reminder-picker-spin input.reminder-picker-hour,
#reminder-picker .reminder-picker-spin input.reminder-picker-minute,
#reminder-picker .reminder-picker-spin input.reminder-picker-second {
  width: 2.6rem;
  min-height: 0;
  height: 2.2rem;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  border: 0 !important;
  border-radius: 6px;
  box-shadow: none !important;
}

#reminder-picker .reminder-picker-spin input:focus {
  background: var(--select-bg);
}

#reminder-picker .reminder-picker-colon {
  font-size: 1.3rem;
  font-weight: 600;
}

/* An end shows its own quick choices, counted from the start. */
#reminder-picker .reminder-picker-quick button[hidden] {
  display: none;
}

/* Seconds are only offered for the time a reminder is sent. */
#reminder-picker .reminder-picker-seconds[hidden] {
  display: none;
}

/* Clear is only offered for a field that may be left empty. */
#reminder-picker .reminder-picker-clear[hidden] {
  display: none;
}

#reminder-picker .reminder-picker-presets {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

#reminder-picker .reminder-picker-presets button {
  padding: 0.15rem 0.6rem;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  background: none;
  border: 1px solid var(--select-border);
  border-radius: 999px;
  cursor: pointer;
}

#reminder-picker .reminder-picker-presets button.is-active {
  color: var(--mobile-app-accent);
  border-color: var(--mobile-app-accent);
}

#reminder-picker .reminder-picker-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: auto;
  font-size: 0.9rem;
}

#reminder-picker .reminder-picker-value i.material-icons {
  color: var(--mobile-app-accent);
  font-size: 1.1rem;
}

#reminder-form .reminder-field-error {
  display: block;
  font-size: 0.85rem;
  color: var(--form-error-text);
}

/* A warning that does not stop saving, such as a time that has passed. */
#reminder-form .reminder-field-warning {
  display: block;
  font-size: 0.85rem;
  color: var(--toast-warning-text);
}

#reminders .reminder-card-key {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#reminders .reminder-card-key code.config-id {
  overflow-wrap: anywhere;
}

/* The "Editing reminder" notice uses the same box as the other notices, with Cancel on the right. */
#notify .notify-reminder-editing[hidden] {
  display: none;
}

#notify .notify-reminder-editing-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

#notify .notify-reminder-editing-body strong {
  overflow-wrap: anywhere;
}