/* Shared InPlay V2 toolbar.
   Visual language follows the Admin Stars toolbar, with Dashboard's preferred
   66px desktop / 62px mobile height. */

body.dark-mode.inplay-v2-shell {
  padding-top: 66px !important;
}

body.inplay-v2-shell .toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 66px !important;
  padding: 0 clamp(12px, 2vw, 28px) !important;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  background: rgba(6, 12, 8, .78) !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 10px 34px rgba(0,0,0,.18) !important;
  z-index: 2300 !important;
}

body.inplay-v2-shell .toolbar-btn {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.035) !important;
  color: #edf6f0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.inplay-v2-shell .toolbar-btn:hover {
  border-color: rgba(59,228,119,.20) !important;
  background: rgba(59,228,119,.09) !important;
  color: #f3fbf6 !important;
  transform: none !important;
}

body.inplay-v2-shell .plan-pill {
  min-height: 32px;
  padding: 0 11px;
  border-color: rgba(59,228,119,.18) !important;
  background: rgba(59,228,119,.075) !important;
  box-shadow: none !important;
}
body.inplay-v2-shell .plan-pill a { color: #dff9e8 !important; }

body.inplay-v2-shell .inplay-v2-toolbar-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

body.inplay-v2-shell .alerts-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 2310;
}

body.inplay-v2-shell .alerts-btn {
  position: relative;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
}
body.inplay-v2-shell .alerts-btn svg { width:19px; height:19px; flex:0 0 auto; }

body.inplay-v2-shell .alerts-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px solid #07100a;
  border-radius: 999px;
  background: var(--ip-accent, #3be477);
  color: #04190c;
  font-size: 9px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

body.inplay-v2-shell #alertsPopover {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: min(390px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-width: none !important;
  max-height: min(560px, calc(100dvh - 92px)) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(59,228,119,.17) !important;
  border-radius: 16px !important;
  background: rgba(8,17,11,.98) !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.52) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #edf6f0 !important;
  transform: none !important;
  z-index: 3000 !important;
}
body.inplay-v2-shell #alertsPopover[hidden] { display:none !important; }

body.inplay-v2-shell #alertsPopover .ap-header {
  position: relative;
  padding: 14px 14px 12px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px 12px;
  align-items: start;
  border-bottom: 1px solid rgba(255,255,255,.065);
  background: transparent;
}
body.inplay-v2-shell #alertsPopover .ap-header h3 {
  margin: 0;
  color: #f0f7f2;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 780;
}
body.inplay-v2-shell #alertsPopover .ap-header h3::after {
  content: "Latest InPlay alerts";
  display: block;
  margin-top: 3px;
  color: #6f8477;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 500;
}
body.inplay-v2-shell #alertsPopover .ap-close-btn {
  position: static !important;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.035) !important;
  color: #9eafa4 !important;
  box-shadow: none !important;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
body.inplay-v2-shell #alertsPopover .ap-close-btn:hover {
  border-color: rgba(59,228,119,.20) !important;
  background: rgba(59,228,119,.07) !important;
  color: #edf8f1 !important;
}
body.inplay-v2-shell #alertsPopover .ap-controls {
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
}
body.inplay-v2-shell #alertsPopover .pill-group {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.inplay-v2-shell #alertsPopover .pill-group .pill {
  min-height: 30px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.035) !important;
  color: #9eb0a5 !important;
  box-shadow: none !important;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}
body.inplay-v2-shell #alertsPopover .pill-group .pill:hover {
  border-color: rgba(59,228,119,.18) !important;
  background: rgba(59,228,119,.055) !important;
  color: #edf7f0 !important;
}
body.inplay-v2-shell #alertsPopover .pill-group .pill.active {
  border-color: rgba(59,228,119,.24) !important;
  background: rgba(59,228,119,.10) !important;
  color: #82eda5 !important;
}
body.inplay-v2-shell #alertsPopover .pill-group .mark-seen { margin-left:auto; }

body.inplay-v2-shell #alertsPopover .ap-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
body.inplay-v2-shell #alertsPopover .ap-list,
body.inplay-v2-shell #alertsPopover .ap-list.ap-list-data {
  margin: 0;
  padding: 7px;
  display: grid;
  gap: 5px;
  list-style: none;
}
body.inplay-v2-shell #alertsPopover .ap-list.skeleton { display:none !important; }
body.inplay-v2-shell #alertsPopover .ap-item,
body.inplay-v2-shell #alertsPopover .ap-item-link {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  outline: 0 !important;
  background: rgba(255,255,255,.025) !important;
  color: #c9d7ce !important;
  text-decoration: none !important;
}
body.inplay-v2-shell #alertsPopover .ap-item:hover,
body.inplay-v2-shell #alertsPopover .ap-item-link:hover {
  border-color: rgba(59,228,119,.16);
  background: rgba(59,228,119,.055) !important;
}
body.inplay-v2-shell #alertsPopover .ap-item.is-new,
body.inplay-v2-shell #alertsPopover .ap-item-link.is-new {
  border-color: rgba(59,228,119,.22);
  background: rgba(59,228,119,.055) !important;
  box-shadow: inset 3px 0 0 rgba(59,228,119,.62);
}
body.inplay-v2-shell #alertsPopover .ap-line-1 {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
body.inplay-v2-shell #alertsPopover .ap-symbol {
  min-width: 44px;
  padding: 5px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255,255,255,.11);
  color: #edf6f0;
  font-size: 10px;
  line-height: 1;
  font-weight: 820;
}
body.inplay-v2-shell #alertsPopover .ap-type {
  color: #708579;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .075em;
}
body.inplay-v2-shell #alertsPopover .ap-time {
  margin-left: auto;
  color: #6f8376;
  font-size: 9px;
  white-space: nowrap;
}
body.inplay-v2-shell #alertsPopover .ap-line-2,
body.inplay-v2-shell #alertsPopover .ap-message {
  color: #aebfb4;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 500;
}
body.inplay-v2-shell #alertsPopover .ap-line-2 { margin-top:6px; padding:0 0 2px; }
body.inplay-v2-shell #alertsPopover .ap-icon { color:#7ceca1; }
body.inplay-v2-shell #alertsPopover .ap-item-actions {
  margin-top: 2px;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
body.inplay-v2-shell #alertsPopover .ap-item-actions .btn-pill {
  min-height:27px;
  padding:4px 8px;
  border:1px solid rgba(255,255,255,.075) !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.035) !important;
  color:#aebfb4 !important;
  box-shadow:none !important;
  font-size:9px;
  line-height:1;
  font-weight:700;
}
body.inplay-v2-shell #alertsPopover .ap-item-actions .btn-pill:hover {
  border-color:rgba(59,228,119,.18) !important;
  background:rgba(59,228,119,.065) !important;
  color:#edf7f0 !important;
}
body.inplay-v2-shell #alertsPopover .ap-empty,
body.inplay-v2-shell #alertsPopover .ap-empty-new {
  padding:30px 16px;
  color:#788d80;
  text-align:center;
  font-size:11px;
}
body.inplay-v2-shell #alertsPopover .ap-footer {
  min-height:0;
  padding:9px 12px 11px;
  display:flex;
  justify-content:center !important;
  align-items:center;
  border-top:1px solid rgba(255,255,255,.06);
  background:transparent !important;
}
body.inplay-v2-shell #alertsPopover .load-more {
  position:relative !important;
  width:48px;
  min-width:48px;
  height:28px;
  min-height:28px;
  margin:8px auto;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
  border-radius:999px !important;
  font-size:0 !important;
  line-height:1 !important;
  text-indent:0 !important;
}
body.inplay-v2-shell #alertsPopover .load-more::before {
  content:"";
  width:14px;
  height:14px;
  display:block;
  flex:0 0 14px;
  background:#aebfb4;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Embedded directory windows intentionally suppress the app chrome. */
body.inplay-v2-shell.toolbar-hidden {
  padding-top: 0 !important;
}
body.inplay-v2-shell.toolbar-hidden .toolbar {
  display: none !important;
}

@media (max-width: 760px) {
  body.dark-mode.inplay-v2-shell { padding-top:62px !important; }
  body.inplay-v2-shell .toolbar {
    height:62px !important;
    padding:0 9px !important;
    gap:8px;
  }
  body.inplay-v2-shell .toolbar-btn {
    min-width:40px;
    min-height:40px;
    padding:8px 10px;
  }
  body.inplay-v2-shell .toolbar-btn.directory-btn { display:none !important; }
  body.inplay-v2-shell .plan-pill { font-size:11px; }
  body.inplay-v2-shell .alerts-btn {
    width:40px !important;
    min-width:40px !important;
    height:40px !important;
    min-height:40px !important;
  }
  body.inplay-v2-shell #alertsPopover,
  body.inplay-v2-shell #alertsPopover.mobile-full {
    position:fixed !important;
    top:68px !important;
    right:10px !important;
    left:10px !important;
    bottom:auto !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    max-height:calc(100dvh - 80px) !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid rgba(59,228,119,.17) !important;
    border-radius:16px !important;
    background:rgba(8,17,11,.985) !important;
    transform:none !important;
  }
  body.inplay-v2-shell #alertsPopover .ap-header { padding:13px 12px 11px; }
  body.inplay-v2-shell #alertsPopover .pill-group {
    overflow-x:auto;
    scrollbar-width:none;
  }
  body.inplay-v2-shell #alertsPopover .pill-group::-webkit-scrollbar { display:none; }
  body.inplay-v2-shell #alertsPopover .pill-group .pill { flex:0 0 auto; }
  body.inplay-v2-shell #alertsPopover .ap-body { max-height:calc(100dvh - 190px); }
  body.inplay-v2-shell #alertsPopover .ap-item,
  body.inplay-v2-shell #alertsPopover .ap-item-link { padding:10px; }
  body.inplay-v2-shell.toolbar-hidden { padding-top:0 !important; }
}
