/* Notification center: independent of legacy .sheet and .btn styles. */
html body #notifDrawer.drawer {
  --notification-surface: #101b2a;
  --notification-muted: #96a5b8;
  --notification-line: rgba(159, 177, 200, .15);
  position: fixed;
  inset: 0;
  display: none;
  z-index: 460;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  padding: 20px !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: rgba(2, 6, 13, .68);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html body #notifDrawer.drawer.open { display: flex; }
body:has(#notifDrawer.open) #mobileSortFab { display: none !important; }
#notifDrawer, #notifDrawer * { box-sizing: border-box; }

#notifDrawer .notification-panel {
  display: flex;
  flex-direction: column;
  width: 540px;
  height: min(620px, 100%);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(159, 177, 200, .22);
  border-radius: 18px;
  background: var(--notification-surface);
  color: #edf2f7;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .38);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
  letter-spacing: normal;
  isolation: isolate;
}

html body .efuel-notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(125, 159, 190, .25);
  border-radius: 10px;
  background: #0b1723;
  color: #d9e6f2;
  cursor: pointer;
}
html body .efuel-notification-button[hidden] { display: none !important; }
.efuel-notification-button > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.efuel-notification-button > .efuel-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #07111f;
  border-radius: 99px;
  background: #dc5265;
  color: #fff;
  font: 700 10px/1 system-ui, sans-serif;
  box-shadow: none;
  pointer-events: none;
}
.efuel-notification-button > .efuel-notification-badge[hidden] { display: none !important; }

#notifDrawer .notification-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 17px;
  margin: 0;
  background: none;
}

#notifDrawer .notification-header h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.025em;
}

#notifDrawer .notification-header p {
  margin: 4px 0 0;
  color: var(--notification-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

#notifDrawer button {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

#notifDrawer .notification-close,
#notifDrawer .notification-tool {
  display: inline-flex;
  position: static;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--notification-muted);
  background: transparent;
  box-shadow: none;
  transform: none;
}

#notifDrawer svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#notifDrawer button:focus-visible,
#notifDrawer summary:focus-visible {
  outline: 2px solid #86c5f3;
  outline-offset: -2px;
}

#notifDrawer button:disabled {
  opacity: .32;
  cursor: default;
}

html body #notifDrawer #notifBody.notification-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden !important;
}

#notifDrawer .notification-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px 0 22px;
  border-bottom: 1px solid var(--notification-line);
}

#notifDrawer .notification-filters {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 22px;
  min-width: 0;
}

#notifDrawer .notification-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--notification-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

#notifDrawer .notification-filter[aria-pressed="true"] {
  border-bottom-color: #7dbce9;
  color: #e7f1fc;
}

#notifDrawer .notification-filter-count {
  color: #8294a9;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

#notifDrawer .notification-filter[aria-pressed="true"] .notification-filter-count {
  color: #afd4f0;
}

#notifDrawer .notification-tools {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

#notifDrawer .notification-list {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #405269 transparent;
  scroll-padding: 12px;
}

#notifDrawer .notification-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 20px 22px 15px;
  border: 0;
  border-bottom: 1px solid var(--notification-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#notifDrawer .notification-item:last-child { border-bottom: 0; }
#notifDrawer .notification-item.unread { background: rgba(87, 152, 202, .055); }

#notifDrawer .notification-item-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 1px;
  border-radius: 9px;
  color: #99b0c7;
  background: #1b2a3b;
}

#notifDrawer .unread .notification-item-icon { color: #aad3f0; }
#notifDrawer .notification-item-icon svg { width: 17px; height: 17px; }

#notifDrawer .notification-item-content {
  display: grid;
  gap: 0;
  min-width: 0;
}

#notifDrawer .notification-item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

#notifDrawer .notification-item-heading h3 {
  margin: 0;
  color: #e7edf5;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#notifDrawer .notification-unread {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  align-self: center;
  border-radius: 50%;
  background: #79bde9;
}

#notifDrawer .notification-time {
  display: block;
  margin: 4px 0 0;
  color: #8495aa;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

#notifDrawer .notification-lot {
  display: grid;
  gap: 2px;
  margin-top: 11px;
  line-height: 1.45;
}

#notifDrawer .notification-lot-name {
  color: #becbdc;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#notifDrawer .notification-lot-number {
  color: #8192a8;
  font-size: 11px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

#notifDrawer .notification-message {
  margin: 10px 0 0;
  color: #aab9cc;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#notifDrawer .notification-item-actions {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-top: 4px;
}

#notifDrawer .notification-item-actions .notif-lot-actions {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin: 0;
  width: 100%;
}

#notifDrawer .notification-item-actions .btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: auto;
  min-height: 40px;
  height: auto;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: #91c9ef;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: none;
}

#notifDrawer .notification-item-actions .btn::after {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin: 0 3px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

#notifDrawer .notification-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 210px;
  padding: 28px 24px;
  text-align: center;
}

#notifDrawer .notification-empty svg {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  color: #697f98;
}

#notifDrawer .notification-empty strong { color: #d4deeb; font-size: 14px; font-weight: 550; }
#notifDrawer .notification-empty p { max-width: 270px; margin: 0; color: var(--notification-muted); font-size: 12px; line-height: 1.6; }
#notifDrawer .notification-empty button { margin-top: 6px; padding: 8px 12px; border: 1px solid #344459; border-radius: 6px; background: transparent; color: #bfdcf2; font-size: 12px; }

#notifDrawer .notification-feedback { padding: 8px 22px; margin: 0; background: #2b222a; color: #efc1c8; font-size: 12px; }
#notifDrawer .notification-feedback:empty { display: none; }

@media (hover: hover) {
  #notifDrawer .notification-close:hover,
  #notifDrawer .notification-tool:not(:disabled):hover { color: #e1eaf4; background: #203045; }
  #notifDrawer .notification-tool[data-notification-clear]:not(:disabled):hover { color: #f0a7b1; background: rgba(180, 73, 94, .12); }
  #notifDrawer .notification-item-actions .btn:hover { color: #c7e5fb; text-decoration: underline; text-underline-offset: 4px; }
  #notifDrawer .notification-filter:hover { color: #d7e6f5; }
}

@media (max-width: 760px) {
  html body #notifDrawer.drawer { padding: 12px !important; }
  #notifDrawer .notification-panel { border-radius: 16px; max-height: 100%; }
  #notifDrawer .notification-header { padding: 19px 18px 12px; }
  #notifDrawer .notification-header h2 { font-size: 19px; }
  #notifDrawer .notification-toolbar { min-height: 52px; padding-left: 18px; padding-right: 10px; }
  #notifDrawer .notification-filters { gap: 20px; }
  #notifDrawer .notification-tool,
  #notifDrawer .notification-close { width: 44px; height: 44px; flex-basis: 44px; }
  #notifDrawer .notification-item { padding: 18px 18px 12px; }
  #notifDrawer .notification-item-actions .btn { min-height: 44px; }
}

@media (max-width: 360px) {
  #notifDrawer .notification-filters { gap: 14px; }
  #notifDrawer .notification-filter { gap: 5px; font-size: 12px; }
  #notifDrawer .notification-item { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding-left: 16px; padding-right: 16px; }
  #notifDrawer .notification-item-icon { width: 28px; height: 28px; border-radius: 8px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  html body #notifDrawer.drawer.open {
    inset: 0 !important;
    padding: max(8px, var(--efuel-safe-top, 0px)) max(8px, var(--efuel-safe-right, 0px)) max(8px, var(--efuel-safe-bottom, 0px)) max(8px, var(--efuel-safe-left, 0px)) !important;
  }
  #notifDrawer .notification-panel { max-height: 100%; }
  #notifDrawer .notification-header { padding: 6px 18px; }
  #notifDrawer .notification-header p { display: none; }
  #notifDrawer .notification-toolbar { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  #notifDrawer *, #notifDrawer *::after { animation: none !important; transition: none !important; }
}
