/* Shared interaction styles */
body {
  opacity: 0;
  transition: opacity 180ms ease;
}

body.page-ready {
  opacity: 1;
}

body.page-leaving {
  opacity: 0;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #c6c9ab;
  border-radius: 10px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 120;
}

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

.profile-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #1b1d10;
  text-decoration: none;
}

.profile-menu a:hover {
  background: #f5f5df;
}

.profile-trigger {
  position: relative;
  overflow: visible;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, 86vw);
  background: #ffffff;
  border: 1px solid #c6c9ab;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
  z-index: 120;
  overflow: hidden;
}

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

.notification-menu-item {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #e3e4ce;
  text-decoration: none;
}

.notification-menu-item:last-child {
  border-bottom: none;
}

.notification-menu-item:hover {
  background: #f5f5df;
}

.leads-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 29, 16, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 80;
}

.leads-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(390px, 92vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #c6c9ab;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

body.leads-drawer-open .leads-detail-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.leads-drawer-open .leads-detail-drawer {
  transform: translateX(0);
}

body.leads-page header,
body.leads-page main {
  transition:
    margin-right 220ms ease,
    width 220ms ease;
}

body.leads-page.leads-drawer-open header {
  width: calc(100% - 260px - min(390px, 92vw));
}

body.leads-page.leads-drawer-open main {
  margin-right: min(390px, 92vw);
}

tr.lead-selected {
  background: #f5f5df;
}
