.shoplinker-status-wrap { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.shoplinker-status-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #f8fafc;
  border-radius: 999px;
  padding: 8px 11px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  max-width: 100%;
}
.shoplinker-status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #94a3b8; }
.shoplinker-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shoplinker-status-button.connected .shoplinker-status-dot,
.shoplinker-status-button.extended .shoplinker-status-dot { background: #22c55e; }
.shoplinker-status-button.expiring-soon .shoplinker-status-dot { background: #f97316; }
.shoplinker-status-button.extend-available .shoplinker-status-dot { background: #38bdf8; }
.shoplinker-status-button.needs-login .shoplinker-status-dot,
.shoplinker-status-button.expired .shoplinker-status-dot,
.shoplinker-status-button.blocked .shoplinker-status-dot { background: #ef4444; }
.shoplinker-status-button.idle-warning .shoplinker-status-dot { background: #a78bfa; }
.shoplinker-popover {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 3000;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid #d8e1ec;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: 0 22px 80px rgba(15,23,42,.24);
  padding: 16px;
}
.shoplinker-popover.hidden { display: none; }
.shoplinker-popover h3 { margin: 0 0 10px; font-size: 18px; }
.shoplinker-popover dl { display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; margin: 0 0 14px; }
.shoplinker-popover dt { color: #64748b; font-weight: 800; }
.shoplinker-popover dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.shoplinker-popover label { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-weight: 800; }
.shoplinker-popover input[type="checkbox"] { width: auto; }
.shoplinker-popover input[type="number"] { width: 100%; min-width: 0; }
.shoplinker-popover select { width: 100%; min-width: 0; }
.shoplinker-popover .shoplinker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shoplinker-popover .shoplinker-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.shoplinker-popover button,
.shoplinker-idle-card button {
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.shoplinker-popover button.secondary,
.shoplinker-idle-card button.secondary { background: #f1f5f9; color: #172033; border: 1px solid #d8e1ec; }
.shoplinker-popover button.danger,
.shoplinker-idle-card button.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.shoplinker-idle-overlay {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15,23,42,.56);
}
.shoplinker-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15,23,42,.56);
}
.shoplinker-idle-overlay.hidden { display: none; }
.shoplinker-login-overlay.hidden { display: none; }
.shoplinker-idle-card {
  width: min(480px, 100%);
  border-radius: 16px;
  background: #fff;
  color: #172033;
  padding: 22px;
  box-shadow: 0 28px 90px rgba(15,23,42,.3);
}
.shoplinker-login-card {
  width: min(460px, 100%);
  max-width: calc(100vw - 32px);
  border-radius: 16px;
  background: #fff;
  color: #172033;
  padding: 22px;
  box-shadow: 0 28px 90px rgba(15,23,42,.3);
}
.shoplinker-login-card h2 { margin: 0 0 8px; }
.shoplinker-login-card p { color: #64748b; line-height: 1.55; }
.shoplinker-login-card form { display: grid; gap: 10px; }
.shoplinker-login-card label { display: grid; gap: 6px; color: #172033; font-weight: 900; }
.shoplinker-login-card input,
.shoplinker-login-card select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  padding: 10px;
}
.shoplinker-login-card .shoplinker-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shoplinker-login-card .shoplinker-check-row input { width: auto; }
.shoplinker-idle-card h2 { margin: 0 0 8px; }
.shoplinker-idle-card p { color: #64748b; line-height: 1.55; }
.shoplinker-idle-countdown { font-weight: 900; color: #b45309; }
@media (max-width: 680px) {
  .shoplinker-popover { top: 64px; right: 12px; left: 12px; width: auto; }
  .shoplinker-popover .shoplinker-grid { grid-template-columns: 1fr; }
  .shoplinker-status-text { max-width: 180px; }
}
