/* =========================================
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;
  color: inherit;
}

.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;
}

/* =========================================
2. Main Layout & Navigation
========================================= */
.main-layout {
  margin-top: 0.5rem;
}

/* =========================================
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;
}

/* 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);
}

@media (max-width: 1000px) {
  .main-layout {
    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: nowrap;
    overflow: hidden;
    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: 0 1 auto;
    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: 9.00rem;
    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;
  }
}

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

.nav ul {
  float: right;
  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 .apprise-lib-ver {
  line-height: 1.15;
  margin-top: 0;
}

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

.nav ul li.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.social-theme-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

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;
}

.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;
}

/* 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 pre {
  white-space: pre-wrap;
  word-break: break-word;
}

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

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

.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;
}

.api-details .plugin-index {
  font-family: monospace;
  font-size: 0.82rem;
  min-width: 2.65rem;
  text-align: center;
  margin-right: 0.3rem;
  border: 1px solid;
  border-radius: 999px;
  padding: 0.13rem 0.45rem;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.api-details .plugin-chevron,
.api-details .plugin-status {
  margin-right: 0.4rem;
}

.api-details .plugin-chevron {
  transition: transform 0.2s ease, color 0.15s ease, opacity 0.15s ease;
  opacity: 0.75;
}

.api-details .collapsible>li.active .plugin-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

/* 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);
}

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

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

.api-details .service_name {
  width: auto;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.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;
}

.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;
}

.detail-buttons--width {
  width: 90%;
  min-width: 60%;
  padding-left: 0;
}

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

/* =========================================
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 .collapsible-body .code-snippet {
  margin-bottom: 0.85rem;
}

.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 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

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

.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;
}

.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-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 .tab a {
  display: inline-flex;
  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 {
  font-size: 1.15rem;
  line-height: 1;
  transform: translateY(-1px);
}

.tabs .tab a .card-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;
}

.tabs.config-overview {
  margin-top: 0;
}

@media (max-width: 900px) {
  .tabs.config-overview {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

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

@media (max-width: 800px) {
  .tabs.config-overview .tab a {
    justify-content: center;
    gap: 0;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .tabs.config-overview .tab a i {
    margin-right: 0 !important;
  }

  .tabs.config-overview .tab a .card-count,
  .tabs.config-overview .tab a span:not(.card-count) {
    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 {
  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.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.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.1;
  opacity: 0.78;
}

#url-list .url-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  flex: 0 0 auto;
  --review-state-icon-box-size: 1.95rem;
}

#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;
}

#url-list .card-panel .url-selected-icon {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--review-state-icon-box-size);
  height: var(--review-state-icon-box-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 .url-disabled-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--review-state-icon-box-size);
  height: var(--review-state-icon-box-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;
}

#url-list .url-tags-row {
  display: flex;
  align-items: flex-start;
  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 0.42rem;
  min-width: 0;
  flex: 0 0 auto;
  border: 1px solid transparent;
}

#url-list .review-test-btn .material-icons {
  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-copy.btn-flat,
.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 {
  margin-top: 0.05rem;
}

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

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

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

.config-id-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

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

code.config-id {
  font-size: 1em;
  font-weight: 700;
}

.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;
}

.code-snippet {
  position: relative;
  margin-bottom: 1rem;
}

.code-snippet pre {
  margin: 0;
}

.snippet-copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
}

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

/* 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-top-row .input-field>label {
  position: static;
  transform: none;
  display: block;
  margin: 0 0 0.2rem 0;
  font-size: 0.9rem;
}

.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.25rem;
}

#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-attachments-field .btn-file,
#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-attachments-field .btn-file i.material-icons,
#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-attachments-field .btn-file i.right,
#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 {
  border-radius: 16px;
  padding: 0 0.75rem;
  line-height: 1.8;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

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

#notify .row,
#notify .row .input-field {
  margin-top: 0.2em;
  margin-bottom: 0;
  padding-bottom: 0;
  padding-top: 0.3rem;
}

.notify-top-row .input-field label[for="id_tag"] {
  position: static;
  transform: none;
  display: block;
  margin-top: -0.1rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.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: flex-start;
  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 .notify-top-row .dropdown-content.select-dropdown li>span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 992px) {

  #notify .notify-form-actions .btn,
  #notify .notify-form-actions .btn-clear-form,
  #notify .notify-attachments-field .btn-file,
  #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 .notify-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #notify .notify-form-actions .btn,
  #notify .notify-form-actions .btn-clear-form {
    width: 100%;
  }
}

/* SweetAlert2 – notification summary and logs */
.swal2-popup .notify-summary {
  text-align: center;
  margin: 0 auto 1rem;
  font-size: 1rem;
  font-weight: 500;
}

.swal2-popup .notify-log-panel {
  margin: 0 auto 0.5rem;
  padding: 0.75rem 1rem;
  max-height: 28rem;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 4px;
  text-align: left;
}

.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: flex;
  flex-direction: row;
  gap: 0.8rem;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0.05rem 0;
  white-space: pre-wrap;
}

.swal2-popup .notify-log-panel ul.logs li .log_time,
.swal2-popup .notify-log-panel ul.logs li .log_level {
  flex-shrink: 0;
}

/* =========================================
Apprise Configuration Editor (Grid Overlay)
========================================= */
.apprise-config-editor {
  display: grid;
  position: relative;
  margin-top: 0.5rem;
}

/* 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;
  padding: 15px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 4px;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow-y: hidden !important;
  margin: 0 !important;
  min-height: 250px;
}

.apprise-config-editor textarea {
  height: initial !important;
  background: transparent !important;
  color: transparent !important;
  z-index: 2;
  resize: vertical;
  border: 1px solid #444 !important;
}

.apprise-config-editor .apprise-config-highlight {
  z-index: 1;
  pointer-events: none;
  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-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-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* Mobile layout */
@media (max-width: 600px) {
  .config-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .config-url-builder-btn {
    width: 100%;
    margin-top: 0.5rem;
  }

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