/* Notification center — follows the shared BIZ surface, list and icon contracts. */
.phone {
  --notification-unread: var(--biz-brand, var(--modern-primary, #0056f5));
}

.phone .notification-header {
  min-height: var(--biz-touch, 48px);
}

.phone .notification-mark-all {
  min-width: max-content;
  gap: 8px;
}

html body .phone .focused-header > button.biz-header-text-action.notification-mark-all:last-child:not(:first-child) {
  border: 1px solid rgb(255 255 255 / 32%) !important;
  color: #fff !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 28%), transparent 58%),
    color-mix(in srgb, var(--biz-brand, var(--modern-primary, #0056f5)) 88%, transparent) !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 38%),
    0 6px 18px color-mix(in srgb, var(--biz-brand, var(--modern-primary, #0056f5)) 24%, transparent) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

html[data-color-scheme="dark"] body .phone .focused-header > button.biz-header-text-action.notification-mark-all:last-child:not(:first-child) {
  border-color: rgb(255 255 255 / 18%) !important;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 20%), transparent 58%),
    color-mix(in srgb, var(--biz-brand, var(--modern-primary, #0056f5)) 82%, transparent) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 6px 18px rgb(0 0 0 / 18%) !important;
}

.phone .notification-mark-all > svg {
  width: var(--biz-icon-glyph, 20px);
  height: var(--biz-icon-glyph, 20px);
  flex: 0 0 var(--biz-icon-glyph, 20px);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--biz-icon-check-stroke, 2.15);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone .notification-mark-all[hidden] { display: none !important; }

.phone .notification-filters {
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0 0;
}

.phone .notification-filters button {
  min-width: 0;
  min-height: 48px;
  font-family: var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
}

.phone .notification-groups {
  display: grid;
  gap: var(--app-list-section-gap, 48px);
  margin-top: 24px;
}

.phone .notification-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin: 0 0 8px;
  padding-inline: var(--biz-section-heading-inset, 20px);
}

.phone .notification-group > header h2 {
  margin: 0;
  color: var(--biz-ink, var(--ink));
  font-family: var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.phone .notification-group > header span {
  color: var(--biz-muted, var(--muted));
  font: 400 12px/20px var(--biz-font-regular, "Vazirmatn Regular", Tahoma, sans-serif);
}

.phone .notification-list {
  overflow: hidden;
  border: 1px solid var(--biz-card-line, var(--line));
  border-radius: var(--biz-radius-card, 24px);
  background: var(--biz-surface, var(--paper));
  box-shadow: var(--biz-shadow-card, none);
}

.phone .notification-item {
  position: relative;
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 10px 40px minmax(0, 1fr) max-content 16px;
  align-items: center;
  column-gap: 12px;
  padding: 16px;
  border: 0;
  border-radius: 0;
  color: var(--biz-ink, var(--ink));
  background: transparent;
  text-align: start;
}

.phone .notification-item + .notification-item::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 68px 16px;
  height: 1px;
  background: var(--biz-line, var(--line));
}

.phone .notification-item.is-unread { background: transparent; }

.phone .notification-time {
  color: var(--biz-muted, var(--muted));
  font: 700 12px/20px "Vazirmatn Bold", var(--biz-font-bold, Tahoma), sans-serif;
  white-space: nowrap;
  align-self: center;
}

.phone .notification-item .biz-icon-tile {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  padding: 0;
  border-radius: var(--biz-icon-radius-row, 12px);
  line-height: 0;
}

.phone .notification-item .biz-icon-tile svg {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  transform: none;
}

.phone .notification-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.phone .notification-copy strong {
  color: var(--biz-ink, var(--ink));
  font-family: var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: max(24px, 1.65em);
  overflow-wrap: anywhere;
}

.phone .notification-copy small {
  color: var(--biz-muted, var(--muted));
  font-family: var(--biz-font-regular, "Vazirmatn Regular", Tahoma, sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: max(20px, 1.65em);
  overflow-wrap: anywhere;
}

.phone .notification-meta {
  align-self: center;
  min-width: 16px;
  display: grid;
  place-items: center;
}

.phone .notification-unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--notification-unread);
}

.phone .notification-unread-dot.is-read { visibility: hidden; }

.phone .notification-meta svg {
  width: 16px;
  height: 16px;
  color: var(--biz-muted, var(--muted));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.phone .notification-empty {
  margin: 48px 0 0;
  padding: 32px 20px;
  border-radius: var(--biz-radius-card, 24px);
  color: var(--biz-muted, var(--muted));
  background: var(--biz-surface, var(--paper));
  text-align: center;
}

.phone .notification-empty .biz-icon-tile {
  box-sizing: border-box;
  width: var(--biz-icon-tile-action, 48px);
  height: var(--biz-icon-tile-action, 48px);
  min-width: var(--biz-icon-tile-action, 48px);
  min-height: var(--biz-icon-tile-action, 48px);
  margin: 0 auto 16px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--biz-icon-radius-action, 16px);
  line-height: 0;
}
.phone .notification-empty .biz-icon-tile svg {
  display: block;
  width: var(--biz-icon-glyph, 20px);
  height: var(--biz-icon-glyph, 20px);
  margin: 0;
  transform: none;
}
.phone .notification-empty h2 { margin: 0; color: var(--biz-ink, var(--ink)); font: 600 16px/26px var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif); }
.phone .notification-empty p { margin: 4px 0 0; font: 400 12px/20px var(--biz-font-regular, "Vazirmatn Regular", Tahoma, sans-serif); }

.phone .notification-detail-sheet {
  padding: 20px 18px max(24px, env(safe-area-inset-bottom));
  border-top: 0;
  border-radius: 32px 32px 0 0;
}

.phone .notification-detail-sheet > header {
  min-height: 52px;
  margin-bottom: 20px;
}

.phone .notification-detail-sheet > header > div { display: grid; gap: 4px; }

.phone .notification-detail-sheet > header small {
  width: max-content;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--biz-brand, var(--modern-primary));
  background: color-mix(in srgb, var(--biz-brand, var(--modern-primary)) 9%, transparent);
  font: 500 11px/18px var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
}

.phone .notification-detail-sheet > header h2 {
  margin: 0;
  color: var(--biz-ink, var(--ink));
  font: 700 20px/32px var(--biz-font-bold, "Vazirmatn Bold", Tahoma, sans-serif);
}

.phone .notification-detail-summary {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--biz-card-line, var(--line));
  border-radius: 22px;
  background: var(--biz-surface, var(--paper, #fff));
  box-shadow: none;
}

.phone .notification-detail-summary .biz-icon-tile {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  box-shadow: 0 8px 20px color-mix(in srgb, currentColor 10%, transparent);
}

.phone .notification-detail-summary .biz-icon-tile svg { width: 22px; height: 22px; }
.phone .notification-detail-summary > div { min-width: 0; display: grid; gap: 8px; }
.phone .notification-detail-summary time {
  width: max-content;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--biz-ink, var(--ink));
  background: color-mix(in srgb, var(--biz-surface, var(--paper)) 76%, transparent);
  font: 700 12px/20px "Vazirmatn Bold", var(--biz-font-bold, Tahoma), sans-serif;
}
.phone .notification-detail-summary p { margin: 0; color: var(--biz-ink, var(--ink)); font: 500 14px/26px var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif); overflow-wrap: anywhere; }

.phone .notification-detail-context {
  position: relative;
  margin-top: 16px;
  padding: 16px 18px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--biz-brand, var(--modern-primary)) 12%, var(--biz-card-line, var(--line)));
  border-radius: 18px;
  background: color-mix(in srgb, var(--biz-brand, var(--modern-primary)) 4%, var(--biz-surface, var(--paper)));
}
.phone .notification-detail-context::before {
  content: "";
  position: absolute;
  inset-block: 16px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--biz-brand, var(--modern-primary));
}
.phone .notification-detail-context strong { color: var(--biz-ink, var(--ink)); font: 600 14px/24px var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif); }
.phone .notification-detail-context p { margin: 6px 0 0; color: var(--biz-muted, var(--muted)); font: 400 13px/24px var(--biz-font-regular, "Vazirmatn Regular", Tahoma, sans-serif); }
.phone .notification-detail-sheet > .primary-button { width: 100%; min-height: 52px; margin-top: 20px; }
.phone .notification-detail-sheet > .primary-button > span { font-size: inherit !important; line-height: inherit !important; }

.phone .header-notification-button { position: relative; }
.phone .header-notification-badge {
  position: absolute;
  top: -3px;
  left: -3px;
  right: auto;
  width: 22px;
  min-width: 22px;
  height: 22px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 1px 0 0;
  border: 2px solid var(--biz-surface, #fff);
  border-radius: 50%;
  color: #fff;
  background: #d23445;
  font: 600 10px/1 var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif);
  letter-spacing: 0;
  text-align: center;
  direction: ltr;
}
.phone .header-notification-badge[hidden] { display: none; }

html[data-color-scheme="dark"] .phone .notification-list,
html[data-color-scheme="dark"] .phone .notification-empty,
html[data-color-scheme="dark"] .phone .notification-detail-summary { border-color: transparent; }

html[data-color-scheme="dark"] .phone .header-notification-badge {
  border-color: var(--biz-surface, #19212d);
  background: #d23445;
  color: #fff;
}

.phone[data-app-theme="soft-precise"] .notification-list { border-color: transparent; }

@media (max-width: 390px) {
  .phone .notification-item { padding-inline: 16px; }
  .phone .notification-group > header { padding-inline: 16px; }
}

@media (forced-colors: active) {
  .phone .notification-list { border: 1px solid CanvasText; }
  .phone .notification-unread-dot { background: Highlight; }
}
