/*
 * Notifications refonte (cloche + lignes) — bloc .notif-*
 * Source mainteneur : ONSPanel/Themes/BackEnd/AdminPorto/assets/src/css/sass/gui/_notifications.scss
 * Fichier servi aux surfaces qui ne chargent pas admin-porto/theme.css (espace client via core::partials.head).
 * Régénérer : recompiler le SCSS puis ré-extraire le bloc .notif-* (voir handoff).
 */
.notif-bell,
.notif-panel {
  --notif-cyan: #16b5d4;
  --notif-cyan-d: #119bb8;
  --notif-green: #1f9d6b;
  --notif-navy: #1c3c5a;
  --notif-ink: #2b3a4a;
  --notif-gray: #6b7785;
  --notif-line: #e6e9ee;
  --notif-app-bg: #eef1f4;
  font-family: "Open Sans", system-ui, -apple-system, Arial, sans-serif;
  box-sizing: border-box;
}
.notif-bell *,
.notif-bell *::before,
.notif-bell *::after,
.notif-panel *,
.notif-panel *::before,
.notif-panel *::after {
  box-sizing: border-box;
}

.notif-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #8a96a3;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.notif-bell svg {
  width: 21px;
  height: 21px;
}
.notif-bell i {
  font-size: 19px;
  line-height: 1;
}
.notif-bell:hover {
  background: #f2f5f8;
  color: var(--notif-navy, #1c3c5a);
}
.notif-bell.notif-bell--open {
  background: #eaf7fb;
  color: var(--notif-cyan-d, #119bb8);
  border-color: #c5ebf4;
}

.notif-bell__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e2584d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  line-height: 1;
}
.notif-bell__badge:empty, .notif-bell__badge.is-hidden, .notif-bell__badge[hidden] {
  display: none;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 396px;
  background: #fff;
  border: 1px solid var(--notif-line, #e6e9ee);
  border-radius: 16px;
  box-shadow: 0 18px 50px -12px rgba(28, 60, 90, 0.3), 0 4px 14px rgba(28, 60, 90, 0.08);
  overflow: hidden;
  z-index: 40;
  transform-origin: top right;
  color: var(--notif-ink, #2b3a4a);
  text-align: left;
  animation: notifPanelIn 0.16s ease-out;
}
.notif-panel.is-hidden, .notif-panel[hidden] {
  display: none;
}

@keyframes notifPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.notif-panel__arrow {
  position: absolute;
  top: -7px;
  right: 19px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid var(--notif-line, #e6e9ee);
  border-top: 1px solid var(--notif-line, #e6e9ee);
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
  pointer-events: none;
}

.notif-panel__header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--notif-line, #e6e9ee);
}

.notif-panel__header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notif-panel__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--notif-navy, #1c3c5a);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
}

.notif-panel__count {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--notif-cyan, #16b5d4);
  border-radius: 20px;
  padding: 2px 9px;
  line-height: 1.5;
  white-space: nowrap;
  flex: none;
}

.notif-panel__markall {
  border: none;
  background: transparent;
  color: var(--notif-cyan-d, #119bb8);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  white-space: nowrap;
  flex: none;
}
.notif-panel__markall svg {
  width: 14px;
  height: 14px;
}
.notif-panel__markall:hover {
  background: #eaf7fb;
}
.notif-panel__markall:disabled {
  color: #b9c2cc;
  cursor: default;
  background: transparent;
}

.notif-tabs {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  background: #f3f5f8;
  padding: 3px;
  border-radius: 10px;
}

.notif-tab {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--notif-gray, #6b7785);
  padding: 7px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s, color 0.12s;
}
.notif-tab.notif-tab--active {
  background: #fff;
  color: var(--notif-navy, #1c3c5a);
  box-shadow: 0 1px 3px rgba(28, 60, 90, 0.12);
}

.notif-tab__count {
  font-size: 10.5px;
  font-weight: 800;
  background: #e2584d;
  color: #fff;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  line-height: 1;
}
.notif-tab--active .notif-tab__count {
  background: var(--notif-cyan, #16b5d4);
}

.notif-list {
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.notif-list::-webkit-scrollbar {
  width: 9px;
}
.notif-list::-webkit-scrollbar-thumb {
  background: #d4dae1;
  border-radius: 6px;
  border: 3px solid #fff;
}

.notif-group-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa6b2;
  padding: 14px 18px 6px;
  position: sticky;
  top: 0;
  background: linear-gradient(#fff 78%, rgba(255, 255, 255, 0));
  z-index: 1;
}

.notif-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 13px;
  align-items: start;
  padding: 13px 18px 14px;
  border-bottom: 1px solid #f0f2f5;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.notif-row:hover {
  background: #f8fafb;
  text-decoration: none;
  color: inherit;
}
.notif-row:visited {
  color: inherit;
}

.notif-row--unread {
  background: #f3fbfd;
}
.notif-row--unread:hover {
  background: #ecf8fc;
}
.notif-row--unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--notif-cyan, #16b5d4);
}

.notif-row__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
}
.notif-row__icon svg {
  width: 21px;
  height: 21px;
}
.notif-row__icon i {
  font-size: 19px;
  line-height: 1;
}

.notif-row__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.notif-row__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--notif-navy, #1c3c5a);
  line-height: 1.35;
}
.notif-row__title .ref {
  color: var(--notif-cyan-d, #119bb8);
}

.notif-row__desc {
  font-size: 12.5px;
  color: var(--notif-gray, #6b7785);
  line-height: 1.45;
  margin-top: 3px;
}
.notif-row__desc b {
  color: var(--notif-ink, #2b3a4a);
  font-weight: 700;
}

.notif-row__actor {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 9px;
}

.notif-row__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  flex: none;
}

.notif-row__actor-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--notif-ink, #2b3a4a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}

.notif-row__actor-company {
  font-size: 11.5px;
  color: #9aa6b2;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.notif-row__status {
  display: inline-block;
  align-self: flex-start;
  margin-top: 9px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.notif-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}

.notif-row__time {
  font-size: 11px;
  color: #9aa6b2;
  white-space: nowrap;
  font-weight: 600;
}

.notif-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--notif-cyan, #16b5d4);
  flex: none;
}

.notif-icon--green {
  background: #e7f6ee;
  color: #1f9d6b;
}

.notif-status--green {
  background: #e7f6ee;
  color: #1f9d6b;
}

.notif-icon--amber {
  background: #fbf2de;
  color: #d3962a;
}

.notif-status--amber {
  background: #fbf2de;
  color: #d3962a;
}

.notif-icon--red {
  background: #fcebe9;
  color: #e2584d;
}

.notif-status--red {
  background: #fcebe9;
  color: #e2584d;
}

.notif-icon--red-dark {
  background: #f6e2e0;
  color: #a32a23;
}

.notif-status--red-dark {
  background: #f6e2e0;
  color: #a32a23;
}

.notif-icon--cyan {
  background: #eaf7fb;
  color: #119bb8;
}

.notif-status--cyan {
  background: #eaf7fb;
  color: #119bb8;
}

.notif-icon--violet {
  background: #eeebfd;
  color: #7a6cf0;
}

.notif-status--violet {
  background: #eeebfd;
  color: #7a6cf0;
}

.notif-icon--navy {
  background: #eef1f4;
  color: #1c3c5a;
}

.notif-status--navy {
  background: #eef1f4;
  color: #1c3c5a;
}

.notif-icon--gray {
  background: #eef1f4;
  color: #6b7785;
}

.notif-status--gray {
  background: #eef1f4;
  color: #6b7785;
}

.notif-empty {
  padding: 46px 24px;
  text-align: center;
  color: #9aa6b2;
}

.notif-empty__icon {
  display: inline-block;
  margin-bottom: 10px;
  color: #cfd7df;
}
.notif-empty__icon svg {
  width: 38px;
  height: 38px;
  color: #cfd7df;
}
.notif-empty__icon i {
  font-size: 34px;
  line-height: 1;
}

.notif-empty__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--notif-gray, #6b7785);
}

.notif-empty__desc {
  font-size: 12.5px;
  margin-top: 3px;
}

.notif-panel__footer {
  padding: 11px 18px;
  border-top: 1px solid var(--notif-line, #e6e9ee);
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-panel__viewall {
  font-size: 13px;
  font-weight: 700;
  color: var(--notif-cyan-d, #119bb8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.notif-panel__viewall svg {
  width: 15px;
  height: 15px;
}
.notif-panel__viewall:hover {
  color: var(--notif-cyan, #16b5d4);
  text-decoration: none;
}

.notif-panel__prefs {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9aa6b2;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.notif-panel__prefs svg {
  width: 17px;
  height: 17px;
}
.notif-panel__prefs i {
  font-size: 15px;
  line-height: 1;
}
.notif-panel__prefs:hover {
  background: #eef1f4;
  color: var(--notif-navy, #1c3c5a);
}

.notif-prefs__header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px 13px;
  border-bottom: 1px solid var(--notif-line, #e6e9ee);
}

.notif-prefs__back {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--notif-line, #e6e9ee);
  background: #fff;
  color: var(--notif-navy, #1c3c5a);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  padding: 0;
  transition: background 0.12s;
}
.notif-prefs__back svg {
  width: 17px;
  height: 17px;
}
.notif-prefs__back:hover {
  background: #f2f5f8;
}

.notif-prefs__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--notif-navy, #1c3c5a);
  letter-spacing: -0.01em;
  margin: 0;
}

.notif-prefs {
  max-height: 472px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0 8px;
}
.notif-prefs::-webkit-scrollbar {
  width: 9px;
}
.notif-prefs::-webkit-scrollbar-thumb {
  background: #d4dae1;
  border-radius: 6px;
  border: 3px solid #fff;
}

.notif-prefs__section {
  padding: 14px 18px 4px;
}

.notif-prefs__section-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa6b2;
  margin-bottom: 4px;
}

.notif-prefs__section-desc {
  font-size: 12px;
  color: var(--notif-gray, #6b7785);
  margin-bottom: 8px;
  line-height: 1.45;
}

.notif-prefs__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
}
.notif-prefs__row:last-child {
  border-bottom: none;
}

.notif-prefs__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
}
.notif-prefs__icon svg {
  width: 18px;
  height: 18px;
}
.notif-prefs__icon i {
  font-size: 16px;
  line-height: 1;
}

.notif-prefs__text {
  flex: 1;
  min-width: 0;
}

.notif-prefs__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--notif-navy, #1c3c5a);
}

.notif-prefs__sub {
  font-size: 11.5px;
  color: var(--notif-gray, #6b7785);
  margin-top: 1px;
}

.notif-prefs__saved {
  font-size: 12px;
  color: var(--notif-green, #1f9d6b);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.notif-prefs__saved svg {
  width: 14px;
  height: 14px;
}
.notif-prefs__saved.notif-prefs__saved--show {
  opacity: 1;
}

.notif-prefs__done {
  border: none;
  background: transparent;
  color: var(--notif-cyan-d, #119bb8);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  white-space: nowrap;
}
.notif-prefs__done:hover {
  background: #eaf7fb;
}

.notif-toggle {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 20px;
  border: none;
  background: #d4dae1;
  cursor: pointer;
  flex: none;
  transition: background 0.18s;
  padding: 0;
}
.notif-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(28, 60, 90, 0.35);
  transition: transform 0.18s;
}
.notif-toggle.notif-toggle--on {
  background: var(--notif-cyan, #16b5d4);
}
.notif-toggle.notif-toggle--on::after {
  transform: translateX(17px);
}

@media only screen and (max-width: 520px) {
  .notif-panel {
    width: calc(100vw - 24px);
    right: -8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .notif-panel {
    animation: none;
  }
  .notif-toggle,
  .notif-toggle::after,
  .notif-bell,
  .notif-tab,
  .notif-row,
  .notif-prefs__saved {
    transition: none;
  }
}
