/* Höfner Teamchat PWA v2.3 Auto-Push bei neuen Nachrichten */
.hbn-pwa-card {
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + 14px);
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  z-index: 2147483000;
  display: none;
  gap: 12px;
  align-items: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(13,42,38,.97), rgba(14,18,21,.97));
  color: #f8fbfa;
  box-shadow: 0 24px 76px rgba(0,0,0,.40);
  backdrop-filter: blur(16px);
}

.hbn-pwa-card.is-visible {
  display: flex;
  animation: hbnPwaSlideUp .24s ease-out;
}

.hbn-pwa-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  flex: 0 0 46px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  object-fit: cover;
}

.hbn-pwa-card-bell {
  display: inline-grid;
  place-items: center;
  background: #d7b46a;
  color: #10231e;
  font-size: 23px;
}

.hbn-pwa-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.hbn-pwa-card-title {
  margin: 0 0 3px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .01em;
}

.hbn-pwa-card-text {
  margin: 0;
  color: rgba(248,251,250,.77);
  font-size: 12px;
  line-height: 1.36;
}

.hbn-pwa-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.hbn-pwa-primary,
.hbn-pwa-secondary,
.hbn-pwa-close {
  border: 0;
  min-height: 38px;
  border-radius: 999px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hbn-pwa-primary {
  padding: 0 14px;
  background: #d7b46a;
  color: #10231e;
}

.hbn-pwa-secondary {
  padding: 0 12px;
  background: rgba(255,255,255,.10);
  color: #f8fbfa;
}

.hbn-pwa-close {
  width: 38px;
  padding: 0;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.hbn-pwa-standalone .hbn-pwa-install-box,
.hbn-pwa-standalone .hbn-pwa-install-fallback,
.hbn-pwa-notifications-granted .hbn-pwa-notify-box {
  display: none !important;
}

@keyframes hbnPwaSlideUp {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 820px) {
  .hbn-pwa-card {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: min(580px, calc(100vw - 48px));
    margin: 0;
  }
}

@media (max-width: 460px) {
  .hbn-pwa-card {
    align-items: flex-start;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  }
  .hbn-pwa-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hbn-pwa-primary,
  .hbn-pwa-secondary,
  .hbn-pwa-close {
    min-height: 36px;
  }
  .hbn-pwa-close {
    width: 42px;
  }
}

/* Rollout-/Hilfeseiten */
.hbn-pwa-help-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 16% 0%, rgba(215,180,106,.18), transparent 28%), #0d1715;
  color: #f7fbfa;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 20px;
}
.hbn-pwa-help-wrap { max-width: 980px; margin: 0 auto; }
.hbn-pwa-help-card {
  background: linear-gradient(135deg, rgba(20,65,58,.94), rgba(18,24,28,.94));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 26px;
  padding: clamp(18px, 4vw, 30px);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.hbn-pwa-help-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.hbn-pwa-help-page h1 { margin: 0 0 10px; font-size: clamp(28px, 7vw, 48px); line-height: 1.03; }
.hbn-pwa-help-page p, .hbn-pwa-help-page li { line-height: 1.55; color: rgba(247,251,250,.82); }
.hbn-pwa-help-steps { display: grid; gap: 12px; margin-top: 18px; }
.hbn-pwa-help-step { border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.05); }
.hbn-pwa-help-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #d7b46a; color: #10231e; font-weight: 900; margin-right: 8px; }
.hbn-pwa-help-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hbn-pwa-help-btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 18px; background: #d7b46a; color: #10231e; text-decoration: none; font-weight: 850; border: 0; cursor: pointer; }
.hbn-pwa-help-btn.secondary { background: rgba(255,255,255,.10); color: #f7fbfa; }
.hbn-pwa-help-muted { font-size: 13px; color: rgba(247,251,250,.64); }
.hbn-pwa-help-qr-card { background: rgba(255,255,255,.96); color: #10231e; border-radius: 24px; padding: 18px; text-align: center; }
.hbn-pwa-help-qr-card img { width: min(280px, 100%); height: auto; display: block; margin: 0 auto 12px; }
.hbn-pwa-help-qr-card strong { display: block; font-size: 18px; }
@media (max-width: 780px) { .hbn-pwa-help-grid { grid-template-columns: 1fr; } }


/* 2026-06-27: PWA v2.2 Push-Komfort */
.hbn-pwa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #f8fbfa;
  font-weight: 850;
  text-decoration: none;
}

.hbn-pwa-status-pill.is-ok,
.hbn-pwa-status-ok {
  border-color: rgba(74,222,128,.38)!important;
  background: rgba(22,101,52,.22)!important;
}

.hbn-pwa-status-pill.is-warn,
.hbn-pwa-status-warn {
  border-color: rgba(251,191,36,.40)!important;
  background: rgba(113,63,18,.24)!important;
}

.hbn-pwa-status-pill.is-bad,
.hbn-pwa-status-bad {
  border-color: rgba(251,113,133,.42)!important;
  background: rgba(127,29,29,.26)!important;
}

.hbn-pwa-push-page .hbn-pwa-help-card {
  overflow: hidden;
}

.hbn-pwa-push-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}

.hbn-pwa-push-status-card {
  min-height: 112px;
  border-radius: 22px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.hbn-pwa-push-status-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.hbn-pwa-push-status-card span,
.hbn-pwa-push-status-card small {
  display: block;
  color: rgba(247,251,250,.70);
  font-size: 13px;
  line-height: 1.38;
}

.hbn-pwa-push-log {
  margin-top: 16px;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: rgba(247,251,250,.80);
  white-space: pre-wrap;
  overflow: auto;
  max-height: 260px;
  font-size: 13px;
}

.hbn-pwa-device-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.hbn-pwa-device-table th,
.hbn-pwa-device-table td {
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding: 9px 6px;
  text-align: left;
  vertical-align: top;
}

.hbn-pwa-device-table th {
  color: rgba(247,251,250,.70);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

@media(max-width:760px){
  .hbn-pwa-push-status-grid{ grid-template-columns:1fr; }
  .hbn-pwa-device-table{ display:block; overflow-x:auto; }
}


/* 2026-06-27: v2.7 Push-Geräteverwaltung */
.hbn-pwa-device-table input.hbn-device-label-input{
  width:min(260px,100%);
  min-height:34px;
  border-radius:12px;
  border:1px solid rgba(18,61,54,.18);
  padding:0 10px;
  background:rgba(255,255,255,.82);
  color:#10231e;
}
.hbn-device-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;}
.hbn-device-mini-btn{
  min-height:32px;border:0;border-radius:999px;padding:0 10px;
  background:rgba(18,61,54,.10);color:#10231e;font-weight:850;cursor:pointer;
}
.hbn-device-mini-btn.danger{background:rgba(155,47,66,.12);color:#7f1d1d;}
.hbn-device-mini-btn:hover{filter:brightness(.96);}
.hbn-pwa-device-muted{color:rgba(16,35,30,.62);font-size:12px;}
body.hbn-pwa-help-page .hbn-pwa-device-table td{vertical-align:top;}
@media(max-width:760px){.hbn-pwa-device-table input.hbn-device-label-input{width:100%;}.hbn-device-actions{display:grid;grid-template-columns:1fr;}}


/* HBN_PUSH_PREFERENCES_V28 · Push-Einstellungen */
.hbn-push-pref-root{display:grid;gap:14px;margin-top:18px}.hbn-push-pref-global,.hbn-push-pref-room{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border-radius:22px;border:1px solid rgba(226,232,240,.14);background:rgba(255,255,255,.07)}.hbn-push-pref-global strong,.hbn-push-pref-room strong{display:block;font-size:16px}.hbn-push-pref-global small,.hbn-push-pref-room small{display:block;color:#a7b3c6;margin-top:4px}.hbn-push-pref-list{display:grid;gap:10px}.hbn-push-pref-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.hbn-push-pref-btn{min-height:38px;border:1px solid rgba(125,211,252,.22);border-radius:14px;padding:0 12px;background:rgba(125,211,252,.12);color:#f8fafc;font-weight:800}.hbn-push-pref-btn.secondary{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16)}.hbn-push-pref-btn.danger{background:rgba(127,29,29,.50);border-color:rgba(251,113,133,.28)}.hbn-push-pref-status{display:inline-flex;width:max-content;margin-top:8px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:900}.hbn-push-pref-status.ok{background:rgba(34,197,94,.15);color:#bbf7d0;border:1px solid rgba(34,197,94,.22)}.hbn-push-pref-status.warn{background:rgba(251,191,36,.13);color:#fde68a;border:1px solid rgba(251,191,36,.24)}@media(max-width:760px){.hbn-push-pref-global,.hbn-push-pref-room{grid-template-columns:1fr}.hbn-push-pref-actions{justify-content:flex-start}.hbn-push-pref-btn{flex:1 1 auto}}

/* HBN_PUSH_DEVICE_LABELS_V28C · lesbare Geräteverwaltung */
.hbn-pwa-device-table-v28c .hbn-device-readable-name{
  display:block;
  margin:0 0 6px;
  color:#f8fafc;
  font-size:15px;
  font-weight:950;
  line-height:1.25;
}
.hbn-device-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  margin:0 0 8px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  color:rgba(248,250,252,.78);
}
.hbn-device-badge.is-auto{
  border-color:rgba(125,211,252,.22);
  background:rgba(125,211,252,.10);
  color:#bae6fd;
}
.hbn-device-badge.is-custom{
  border-color:rgba(74,222,128,.22);
  background:rgba(74,222,128,.10);
  color:#bbf7d0;
}
.hbn-device-label-row{
  display:grid;
  gap:5px;
  max-width:320px;
  margin:0 0 7px;
  color:rgba(248,250,252,.72);
  font-size:12px;
  font-weight:800;
}
.hbn-device-technical{
  max-width:420px;
  overflow-wrap:anywhere;
}
@media(max-width:760px){
  .hbn-pwa-device-table-v28c .hbn-device-readable-name{font-size:16px;}
  .hbn-device-label-row{max-width:100%;}
  .hbn-device-technical{max-width:100%;}
}
