/* =====================================================================
   theme_make — NOTIFICATIONS dropdown module (v0.28.4). Removable: drop 'make_notifications'
   from hook_callbacks::STATIC_SHEETS to get the previous look back.
   Restyles Moodle's own notification popover (.popover-region-notifications) in place —
   markup and behaviour are Moodle's; only the skin changes. Desktop + mobile.
   ===================================================================== */
.popover-region-notifications .popover-region-toggle::before,
.popover-region-notifications .popover-region-toggle::after { display: none !important; }

.popover-region-notifications .popover-region-container {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: -8px !important; left: auto !important;
  width: 380px !important; max-width: calc(100vw - 24px) !important;
  height: auto !important; max-height: min(560px, calc(100vh - 96px)) !important;
  display: flex !important; flex-direction: column !important;
  padding: 0 !important; margin: 0 !important;
  background: #fffaf2 !important; color: #1f252b !important;
  border: 0 !important; border-radius: 22px !important; overflow: hidden !important;
  box-shadow: 0 30px 60px -28px rgba(15,20,26,.55), 0 0 0 1px rgba(31,37,43,.08) !important;
  z-index: 3000 !important;
  transform-origin: top right;
  animation: make-notif-in .18s cubic-bezier(.22,1,.36,1);
}
.popover-region-notifications.collapsed .popover-region-container { display: none !important; animation: none; }
@keyframes make-notif-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* colour stripe on top, like the login card */
.popover-region-notifications .popover-region-container::before {
  content: ""; display: block; flex: 0 0 5px; height: 5px;
  background: linear-gradient(90deg, #ff27e1 0 25%, #f49f16 25% 50%, #1439f5 50% 75%, #43e7f9 75% 100%);
}

/* header: letterspaced eyebrow + round icon actions */
.popover-region-notifications .popover-region-header-container {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important;
  height: auto !important; padding: 16px 16px 12px 20px !important; margin: 0 !important;
  border: 0 !important; border-bottom: 1px solid rgba(31,37,43,.12) !important; background: transparent !important;
}
.popover-region-notifications .popover-region-header-text {
  margin: 0 !important; padding: 0 !important; line-height: 1 !important;
  font: 800 12px/1 'Quicksand', var(--make-sans, sans-serif) !important; letter-spacing: .16em !important; text-transform: uppercase !important; color: #1f252b !important;
}
.popover-region-notifications .popover-region-header-actions { display: flex !important; align-items: center !important; gap: 6px !important; margin: 0 !important; }
.popover-region-notifications .popover-region-header-actions > a,
.popover-region-notifications .popover-region-header-actions > button,
.popover-region-notifications .popover-region-header-actions .btn {
  width: 34px !important; height: 34px !important; padding: 0 !important; margin: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border: 0 !important; border-radius: 50% !important; background: rgba(31,37,43,.07) !important; color: #1f252b !important;
  transition: background-color .15s ease, color .15s ease;
}
.popover-region-notifications .popover-region-header-actions > a:hover,
.popover-region-notifications .popover-region-header-actions > button:hover,
.popover-region-notifications .popover-region-header-actions .btn:hover { background: #1439f5 !important; color: #fff !important; }
.popover-region-notifications .popover-region-header-actions .icon { margin: 0 !important; font-size: 14px !important; width: 14px !important; height: 14px !important; }

/* list */
.popover-region-notifications .popover-region-content-container {
  flex: 1 1 auto !important; height: auto !important; max-height: none !important; overflow-y: auto !important;
  padding: 8px !important; background: transparent !important;
}
.popover-region-notifications .popover-region-content-container > .empty-message,
.popover-region-notifications .empty-message {
  padding: 34px 18px !important; text-align: center !important; font-size: 14px !important; color: rgba(31,37,43,.6) !important;
}
.popover-region-notifications .all-notifications { display: flex !important; flex-direction: column !important; gap: 4px !important; }
.popover-region-notifications .content-item-container {
  position: relative !important; display: block !important;
  padding: 12px 14px 12px 30px !important; margin: 0 !important;
  border: 0 !important; border-radius: 16px !important; background: transparent !important; color: #1f252b !important;
  transition: background-color .15s ease;
}
.popover-region-notifications .content-item-container:hover { background: rgba(31,37,43,.05) !important; }
.popover-region-notifications .content-item-container.unread { background: rgba(20,57,245,.07) !important; }
.popover-region-notifications .content-item-container.unread:hover { background: rgba(20,57,245,.12) !important; }
.popover-region-notifications .content-item-container::before {
  content: ""; position: absolute; left: 13px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: transparent;
}
.popover-region-notifications .content-item-container.unread::before { background: #1439f5; }
.popover-region-notifications .content-item-container .context-link { display: block !important; color: inherit !important; text-decoration: none !important; }
.popover-region-notifications .content-item-body { display: flex !important; gap: 10px !important; align-items: flex-start !important; padding: 0 !important; }
.popover-region-notifications .content-item-body .notification-image { flex: 0 0 auto; margin: 1px 0 0 !important; }
.popover-region-notifications .content-item-body .notification-image img { width: 20px !important; height: 20px !important; }
.popover-region-notifications .content-item-body .notification-message {
  font-size: 14px !important; line-height: 1.4 !important; color: #1f252b !important; font-weight: 500 !important; text-wrap: pretty;
}
.popover-region-notifications .content-item-container.unread .notification-message { font-weight: 700 !important; }
.popover-region-notifications .content-item-footer {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px !important;
  margin: 6px 0 0 !important; padding: 0 !important; font-size: 12px !important; color: rgba(31,37,43,.55) !important;
}
.popover-region-notifications .content-item-footer .timestamp { font-size: 12px !important; color: rgba(31,37,43,.55) !important; }
.popover-region-notifications .content-item-footer .view-more { font-size: 12px !important; font-weight: 700 !important; color: #1439f5 !important; }
.popover-region-notifications .loading-icon { padding: 20px !important; text-align: center !important; }

/* footer: one "See all" pill */
.popover-region-notifications .popover-region-footer-container {
  height: auto !important; padding: 12px 16px 16px !important; margin: 0 !important;
  border: 0 !important; border-top: 1px solid rgba(31,37,43,.1) !important; background: transparent !important; text-align: center !important;
}
.popover-region-notifications .popover-region-seeall-text,
.popover-region-notifications .see-all-link {
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: 100% !important; height: 42px !important; padding: 0 18px !important; margin: 0 !important;
  border-radius: 999px !important; background: #1f252b !important; color: #fff !important;
  font: 800 14px/1 'Quicksand', var(--make-sans, sans-serif) !important; text-decoration: none !important;
  transition: background-color .15s ease;
}
.popover-region-notifications .see-all-link:hover, .popover-region-notifications .popover-region-seeall-text:hover { background: #1439f5 !important; color: #fff !important; }
.popover-region-notifications .see-all-link .popover-region-seeall-text { background: transparent !important; height: auto !important; padding: 0 !important; }

/* phones: full-width sheet under the top bar */
@media (max-width: 767px) {
  .popover-region-notifications .popover-region-container {
    position: fixed !important; top: 66px !important; left: 8px !important; right: 8px !important;
    width: auto !important; max-width: none !important; max-height: calc(100vh - 82px) !important; max-height: calc(100dvh - 82px) !important;
    border-radius: 20px !important; z-index: 2147482000 !important;
  }
  .popover-region-notifications .content-item-container { padding: 14px 14px 14px 30px !important; }
  .popover-region-notifications .content-item-container::before { top: 21px; }
}

/* v0.28.5: no colour stripe; card in the page cream; footer pill text visible; softer focus ring; no row lines */
.popover-region-notifications .popover-region-container::before { display: none !important; content: none !important; }
.popover-region-notifications .popover-region-container { background: #faf1e6 !important; }
.popover-region-notifications .popover-region-footer-container a,
.popover-region-notifications .popover-region-footer-container a * { color: #fff !important; }
.popover-region-notifications .popover-region-footer-container a { font: 800 14px/1 'Quicksand', var(--make-sans, sans-serif) !important; }
.popover-region-notifications .popover-region-header-actions > a:focus,
.popover-region-notifications .popover-region-header-actions > button:focus,
.popover-region-notifications .popover-region-header-actions .btn:focus { box-shadow: none !important; outline: 0 !important; }
.popover-region-notifications .popover-region-header-actions > a:focus-visible,
.popover-region-notifications .popover-region-header-actions > button:focus-visible,
.popover-region-notifications .popover-region-header-actions .btn:focus-visible { outline: 2px solid #1439f5 !important; outline-offset: 2px !important; }
.popover-region-notifications .content-item-container { border-bottom: 0 !important; }
.popover-region-notifications .content-item-container.unread { background: rgba(20,57,245,.08) !important; }

/* v0.28.6: on phones the dropdown collapsed to a sliver — the top bar creates a containing block, so position:fixed
   was measured against the 40px bell instead of the screen. Back to absolute; make_mobile.js sets the exact left/width. */
@media (max-width: 767px) {
  .popover-region-notifications .popover-region-container {
    position: absolute !important; top: calc(100% + 10px) !important; right: auto !important;
    left: var(--make-notif-left, -220px) !important; width: var(--make-notif-width, calc(100vw - 16px)) !important;
  }
}

/* v0.28.7: phones — the bar above it is position:fixed with no transform, so a fixed dropdown is measured against the
   SCREEN after all; the sliver came from width/height resolving to auto/0. Explicit size, no JS needed. */
@media (max-width: 767px) {
  .popover-region-notifications:not(.collapsed) .popover-region-container {
    position: fixed !important; top: 64px !important; left: 8px !important; right: auto !important;
    width: calc(100vw - 16px) !important; max-width: none !important;
    height: min(72vh, 560px) !important; max-height: none !important;
    display: flex !important; visibility: visible !important; opacity: 1 !important;
    z-index: 2147482000 !important;
  }
  .popover-region-notifications .popover-region-content-container { flex: 1 1 0 !important; min-height: 0 !important; }
  .popover-region-notifications .popover-region-header-container,
  .popover-region-notifications .popover-region-footer-container { flex: 0 0 auto !important; }
}

/* v0.29.4: phones — JS (make_mobile.js) shifts the box onto the screen; keep CSS from fighting it */
@media (max-width: 767px) {
  .popover-region-notifications:not(.collapsed) .popover-region-container { left: 0 !important; right: auto !important; transform: none !important; animation: none !important; }
}
