/* Split from website/static/css/pages.css. Keep selector order compatible with the original cascade. */

.notifications-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 10px 0 calc(104px + env(safe-area-inset-bottom));
}

.notifications-top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.notification-title-toggle {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.notification-title-toggle:hover {
  opacity: 0.88;
}

.notification-title-toggle:active {
  transform: scale(0.99);
}

.notification-title-toggle.is-open .chat-title-chevron {
  transform: rotate(180deg);
}

.notification-title-text {
  min-width: 0;
}

.notifications-action-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% - 10px);
  left: 12px;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 48px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(32, 35, 46, 0.98);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.notifications-action-menu[hidden] {
  display: none;
}

.notifications-menu-item {
  min-height: 38px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(244, 248, 255, 0.94);
  font: 600 12px/1.2 Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.18s ease;
}

.notifications-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notifications-menu-item:active {
  opacity: 0.9;
}

.notifications-menu-item:disabled {
  opacity: 0.38;
  cursor: default;
}

.notifications-menu-item:disabled:hover {
  background: transparent;
}

.notifications-menu-item--danger {
  color: #ff405d;
}

.notifications-menu-item span:first-child,
.notifications-menu-item svg {
  width: 20px;
  height: 20px;
}

.notification-category,
.notification-time {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  color: rgba(242, 243, 247, 0.5);
  text-transform: uppercase;
}

.notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  color: #111318;
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

#notification-section .notification-action,
#notification-section .notification-action:visited {
  color: #111318;
  text-decoration: none;
  text-decoration-color: transparent;
}

.notification-action:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #111318;
  transform: scale(0.99);
}

.notification-action:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.notifications-groups,
.notifications-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-card {
  --notification-tone: rgba(124, 92, 255, 0.22);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--notification-tone), rgba(255, 255, 255, 0) 34%),
    rgba(27, 29, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.notification-card--green {
  --notification-tone: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.16);
}

.notification-card--purple {
  --notification-tone: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.18);
}

.notification-card--yellow {
  --notification-tone: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.18);
}

.notification-card--red {
  --notification-tone: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.2);
}

.notification-card.is-read:not(.notification-card--category-billing):not(.notification-card--category-promo) {
  --notification-tone: rgba(255, 255, 255, 0);
  background: rgba(27, 29, 38, 0.86);
  border-color: rgba(255, 255, 255, 0.045);
  box-shadow: none;
  opacity: 0.76;
}

.notification-card.is-read.notification-card--category-billing,
.notification-card.is-read.notification-card--category-promo {
  opacity: 0.84;
}

.notification-new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111318;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.notification-card:not(.is-read) .notification-card-main {
  padding-top: 14px;
}

.notification-card-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.notification-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-time {
  flex: 0 0 auto;
  color: rgba(242, 243, 247, 0.42);
}

.notification-title {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 20px;
  font-weight: 750;
}

.notification-body {
  margin: 0;
  color: rgba(242, 243, 247, 0.64);
  font-size: 13px;
  line-height: 18px;
}

.notification-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-card-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.notification-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(242, 243, 247, 0.78);
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.notification-icon-button:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: scale(0.99);
}

.notification-icon-button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.notification-icon-button svg {
  width: 18px;
  height: 18px;
}

.notification-delete:hover {
  color: #ff405d;
}

.notifications-empty {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page:has(#notification-section.active .notifications-empty) {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

.page:has(#notification-section.active .notifications-empty) #notification-section.section.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
}

.page:has(#notification-section.active .notifications-empty) .notifications-shell {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 0 calc(104px + env(safe-area-inset-bottom));
}

.page:has(#notification-section.active .notifications-empty) .notifications-groups {
  flex: 1 1 auto;
  min-height: 0;
}

.page:has(#notification-section.active .notifications-empty) .notifications-empty {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 24px;
}

.notifications-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: rgba(242, 243, 247, 0.48);
}

.notifications-empty-icon svg {
  width: 54px;
  height: 54px;
}

.notifications-empty-title {
  font-size: 18px;
  line-height: 23px;
  font-weight: 700;
  color: #ffffff;
}

.notifications-empty-copy {
  margin: 8px 0 0;
  color: rgba(242, 243, 247, 0.54);
  font-size: 13px;
  line-height: 18px;
}
