.ailk-notifications {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  transform: translateY(-50%);
  z-index: 30;
}

.ailk-notifications-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ailk-notifications-toggle:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.ailk-notifications-toggle__icon {
  font-size: 17px;
  line-height: 1;
}

.ailk-notifications-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.28);
}

.ailk-notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: min(340px, 92vw);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  z-index: 40;
  display: none;
  overflow: hidden;
}

.ailk-notifications.is-open .ailk-notifications-dropdown {
  display: block;
}

.ailk-notifications-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.ailk-notifications-dropdown__title {
  font-size: 14px;
  color: #0f172a;
}

.ailk-notifications-dropdown__mark-all {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ailk-notifications-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.ailk-notifications-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid transparent;
}

.ailk-notifications-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.ailk-notifications-item.is-unread {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ailk-notifications-item__body {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.ailk-notifications-item__icon {
  font-size: 14px;
  line-height: 1.3;
  flex-shrink: 0;
  margin-top: 1px;
}

.ailk-notifications-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ailk-notifications-item__title {
  font-size: 13px;
  line-height: 1.3;
}

.ailk-notifications-item__subtitle {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ailk-notifications-item__meta {
  font-size: 11px;
  color: #64748b;
}

/* ── Category left-border accents ────────────────────────────────────────── */

.ailk-notif-cat--search .ailk-notifications-item {
  border-left: 3px solid #7c3aed;
}

.ailk-notif-cat--inspection .ailk-notifications-item {
  border-left: 3px solid #0891b2;
}

.ailk-notif-cat--purchase .ailk-notifications-item {
  border-left: 3px solid #2563eb;
}

.ailk-notif-cat--tracking .ailk-notifications-item {
  border-left: 3px solid #16a34a;
}

.ailk-notif-cat--balance .ailk-notifications-item {
  border-left: 3px solid #d97706;
}

.ailk-notif-cat--system .ailk-notifications-item {
  border-left: 3px solid #94a3b8;
}

/* ── Row wrapper (needed for delete button positioning) ──────────────────── */

.ailk-notifications-row {
  position: relative;
}

.ailk-notifications-row:hover .ailk-notifications-item__delete {
  opacity: 1;
}

/* ── Delete (✕) button ───────────────────────────────────────────────────── */

.ailk-notifications-item__delete {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  padding: 0;
  flex-shrink: 0;
}

/* ── Header message button ───────────────────────────────────────────────── */

.ailk-msg-header-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.ailk-msg-header-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
  color: #1e293b;
}

.ailk-msg-header-btn.has-unread {
  border-color: #bfdbfe;
  color: #2563eb;
}

.ailk-msg-header-btn__badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.28);
}

.ailk-msg-header-btn__badge[hidden] {
  display: none;
}

.ailk-notifications-item__delete:hover {
  background: #fee2e2;
  color: #dc2626;
  opacity: 1;
}

/* Compact the item link to not overlap with delete button */
.ailk-notifications-row .ailk-notifications-item {
  padding-right: 28px;
}

/* ── Header actions (mark-all + clear-read) ──────────────────────────────── */

.ailk-notifications-dropdown__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ailk-notifications-dropdown__clear-read {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.ailk-notifications-dropdown__clear-read:hover {
  color: #dc2626;
}

.ailk-notifications-empty {
  padding: 14px;
  font-size: 13px;
  color: #64748b;
}

.ailk-notifications-dropdown__footer {
  border-top: 1px solid #e2e8f0;
  padding: 10px 14px;
  text-align: center;
}

.ailk-notifications-dropdown__all {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.ailk-notifications-dropdown__all:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  /* On mobile the bell is inline in the flex row.
     The dropdown is positioned relative to .ailk-account (nearest positioned parent).
     Align to right edge of account block so it doesn't overflow left. */
  .ailk-notifications-dropdown {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    top: calc(100% + 8px);
  }
}
