/* =========================
   SW Private Nachrichten
   ========================= */

.sw-pn-postfach,
.sw-pn-gespraech,
.sw-pn-direct,
.sw-pn-start-box {
  margin: 20px 0;
}

.sw-pn-hinweis,
.sw-pn-fehler {
  margin: 0 0 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.5;
}

.sw-pn-hinweis {
  background: rgba(102,255,255,0.08);
  border: 1px solid rgba(102,255,255,0.18);
  color: #fff;
}

.sw-pn-fehler {
  background: rgba(255,80,80,0.12);
  border: 1px solid rgba(255,80,80,0.24);
  color: #fff;
}

/* Postfach */
.sw-pn-postfach {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sw-pn-postfach-eintrag {
  background: #454545;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.sw-pn-postfach-eintrag.has-unread {
  border-left: 4px solid #66ffff;
}

.sw-pn-postfach-kopf,
.sw-pn-postfach-fuss {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sw-pn-postfach-partner {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.sw-pn-postfach-bezug,
.sw-pn-postfach-snippet,
.sw-pn-postfach-datum {
  color: rgba(255,255,255,0.88);
}

.sw-pn-postfach-status,
.sw-pn-postfach-ungelesen {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.sw-pn-postfach-status {
  background: rgba(255,255,255,0.10);
  color: #fff;
}

.sw-pn-postfach-ungelesen {
  background: rgba(102,255,255,0.12);
  color: #66ffff;
}

/* Gespräch */
.sw-pn-kopf {
  background: #454545;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.sw-pn-kopf-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.sw-pn-kopf-links {
  flex: 1 1 auto;
  min-width: 0;
}

.sw-pn-kopf-rechts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.sw-pn-chat-titel {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.sw-pn-chat-partner {
  margin-top: 4px;
  color: rgba(255,255,255,0.82);
}

.sw-pn-icon-button,
.sw-pn-ended-button {
  min-width: auto !important;
  padding: 8px 12px !important;
  line-height: 1 !important;
}

.sw-pn-unread-wrapper {
  display: inline-block;
}

.sw-pn-unread-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: #fff;
  vertical-align: middle;
}

.sw-pn-unread-link:hover .sw-pn-unread-text {
  color: #66ffff;
}

.sw-pn-unread-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #66ffff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.sw-pn-unread-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: color 0.2s ease;
}

/* Report details */
.sw-pn-report-box {
  position: relative;
}

.sw-pn-report-trigger {
  cursor: pointer;
  list-style: none;
}

.sw-pn-report-trigger::-webkit-details-marker {
  display: none;
}

.sw-pn-report-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  z-index: 30;
  background: #454545;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.28);
}

/* Nachrichten */
.sw-pn-nachrichten {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.sw-pn-nachricht {
  max-width: 820px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.sw-pn-nachricht.is-own {
  margin-left: auto;
  background: rgba(102,255,255,0.08);
  border-color: rgba(102,255,255,0.18);
}

.sw-pn-meta {
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.9);
}

.sw-pn-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #fff;
  word-break: break-word;
}

/* Formulare */
.sw-pn-reply-form,
.sw-pn-start-form,
.sw-pn-direct form {
  margin-top: 20px;
}

.sw-pn-unread-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #66ffff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.sw-pn-unread-count.is-hidden {
  display: none;
}

@media (max-width: 767px) {
  .sw-pn-kopf-inner,
  .sw-pn-postfach-kopf,
  .sw-pn-postfach-fuss {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-pn-kopf-rechts {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .sw-pn-report-panel {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .sw-pn-nachricht {
    max-width: 100%;
  }
}
