.netmail-post {
  overflow-anchor: none;
}

#netmail-timeline {
  overflow-anchor: auto;
}

.timeline{
    list-style-type:none;
    margin:0;
    padding:0;
    position:relative
}

@media (max-width:991.98px){
    .timeline:before{
        left:50%
    }
}
@media (max-width:575.98px){
    .timeline:before{
        left:50%
    }
}
.timeline > li,
.timeline > .netmail-post {
    min-height: 50px;
    padding: 0 0 15px;
    position: relative;
}
.timeline .timeline-time{
    display:table;
    left:0;
    position:relative;
    right:0;
    top:35px
}
.timeline .timeline-time .date{
    display:block;
    font-weight:600;
    line-height:16px
}
.timeline .timeline-time .time{
    display:block;
    font-weight:600;
    line-height:18px
}
.timeline .timeline-icon{
    left:52%;
    position:absolute;
    text-align:center;
    top:36px;
    width:10%
}
.timeline .timeline-icon a{
    -webkit-border-radius:24px;
    border-radius:24px
}
.netmail-post.netmail-textfield:first-child{
    padding-top:0
}
.timeline .timeline-body{
    word-wrap:break-word;
    background-color: var(--bs-body-bg);
    border-radius:1rem;
    margin-top:50px;
    overflow:visible;
    padding:15px;
    position:relative
}
.timeline .timeline-body:first-child{
    margin-top:0
}

.timeline .timeline-body>div+div:last-child{
    -webkit-border-radius:0 0 6px 6px;
    border-radius:0 0 6px 6px;
    margin-bottom:-20px;
    padding-bottom:20px
}
@media (max-width:575.98px){
    .timeline .timeline-body>div+div:last-child{
        margin-bottom:-15px;
        padding-bottom:15px
    }
}
.timeline .timeline-content:after,.timeline .timeline-content:before{
    clear:both;
    content:"";
    display:table
}
.timeline .timeline-title{
    margin-top:0
}
.timeline .timeline-footer{
    background:#fff;
    border-top:1px solid #c8c8c8;
    font-weight:600;
    padding-top:15px
}
.timeline .timeline-footer a:not(.btn){
    color:#6f6f6f
}
.timeline .timeline-footer a:not(.btn):focus,.timeline .timeline-footer a:not(.btn):hover{
    color:#222
}
@media (max-width:575.98px){
    .timeline .timeline-comment-box{
        margin-left:-15px;
        margin-right:-15px;
        padding:15px
    }
}
.timeline .timeline-comment-box .user{
    -webkit-border-radius:36px;
    border-radius:36px;
    float:left;
    height:34px;
    overflow:hidden;
    width:34px
}
.timeline .timeline-comment-box .user+.input{
    margin-left:44px
}
.timeline .timeline-comment-box .user img{
    max-height:100%;
    max-width:100%
}
#podium-box{
    min-height:240px
}
.podium-number{
    color:#fff;
    font-size:1.5rem;
    font-weight:700
}
.step-container{
    display:flex;
    flex-direction:column
}
.step-container>div:first-child{
    margin-top:auto;
    text-align:center
}
.step{
    text-align:center
}
.bg-blue{
    background-color:#063b65
}
#first-step{
    min-height:40%
}
#second-step{
    min-height:27%
}
#third-step{
    min-height:20%
}
@media (max-width:575.98px){
    #first-step,#second-step,#third-step{
        min-height:0;
        padding-bottom:5px;
        padding-top:5px
    }
}
.commentsWrapper:not(:last-child)>.col-left:before,.commentsWrapper_top_comment:not(:last-child)>.col-left:before{
    border-left:3px solid #ebebeb;
    border-left-style: solid;
    border-left-width: 3px;
    border-left-color: var(--bs-border-color);
    bottom:0;
    content:"";
    left:50%;
    position:absolute;
    right:0;
    top:0;
    transform:translateX(-2px)
}
.nerofix-inverse .commentsWrapper:not(:last-child)>.col-left:before,.commentsWrapper_top_comment:not(:last-child)>.col-left:before{
    border-left:3px solid #444;
    bottom:0;
    content:"";
    left:50%;
    position:absolute;
    right:0;
    top:0;
    transform:translateX(-2px)
}

.col-right{
    word-wrap: anywhere
}
.comment-avatar{
    border-radius:9999px;
    border-width:0;
    height:46px;
    width:46px
}
.comment-avatar img{
    height:40px;
    margin:3px;
    width:40px
}
.comment-avatar-bg{
    background-color:#ebebeb
}

@media (max-width: 575.98px) {

    .timeline .timeline-body,
    .timeline .timeline-comment-box,
    .commentsWrapper {
        max-width: 100%;
        width: auto;
        margin-left: auto;
        margin-right: auto;
    }

  
    .timeline .timeline-comment-box .user {
        width: 24px; 
        height: 24px; 
    }

    .timeline .timeline-comment-box .user img {
        width: 20px; 
        height: 20px; 
    }

    .comment-avatar {
        width: 34px; 
        height: 34px; 
    }

    .comment-avatar img {
        width: 30px; 
        height: 30px; 
        margin: 0.13rem;
    }

   
    .timeline .timeline-comment-box .user + .input {
        margin-left: 32px; 
    }

   
    .timeline-comment-box .input {
        width: 100%;
    }

    
    .netmailcomment_replywrapper {
        width: 100%;
        max-width: 100%;
    }

    
    .col-right {
        margin-left: 8px !important; 
    }

    .comment-thread-line {
        margin-left: 12px; 
        border-left-width: 1px; 
    }
}



.timeline-time.grid-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Links, Mitte, Rechts */
  align-items: center;
  position: relative;
}

.timeline-time .left-side {
  justify-self: start;
}

.timeline-time .center {
  justify-self: center;
}

.timeline-time .right-side {
  justify-self: end;
}

.netmail-fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.netmail-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.netmailcomment_btns {
    font-weight: 700;
}

.netmailcomment-wrapper {
  --nf-comment-collapsed-height: 200px;
  --nf-comment-fade-height: 2rem;
  position: relative;
}

.netmailcomment-body {
  position: relative;
  overflow: hidden;
  max-height: none;
  transition: max-height .25s ease;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* COLLAPSED STATE */

.netmailcomment-wrapper.is-collapsed .netmailcomment-body {
  max-height: var(--nf-comment-collapsed-height);
}

.netmailcomment-wrapper.is-collapsed .netmailcomment-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nf-comment-fade-height);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(var(--nf-comment-fade-rgb),0),
    rgba(var(--nf-comment-fade-rgb),0.9) 70%,
    rgba(var(--nf-comment-fade-rgb),1)
  );
}

/* EXPANDED STATE */

.netmailcomment-wrapper.is-expanded .netmailcomment-body {
  max-height: none !important;
}

/* IMPORTANT: remove fade */

.netmailcomment-wrapper.is-expanded .netmailcomment-body::after {
  display: none;
}

/* DEFAULT (no collapse needed) */

.netmailcomment-wrapper:not(.is-collapsed) .netmailcomment-body::after {
  display: none;
}

.netmailcomment-toggle {
  text-decoration: none;
}

.netmailcomment-toggle:hover,
.netmailcomment-toggle:focus {
  text-decoration: underline;
}

[data-bs-theme="dark"] .timeline .timeline-body {
  background-color: var(--nf-dark-surface);
  color: var(--nf-dark-text);
}

:root,
[data-bs-theme="light"] {
  --nf-comment-fade-rgb: 255, 255, 255;
}

[data-bs-theme="dark"] {
  --nf-comment-fade-rgb: 33, 37, 41;
}

[data-bs-theme="dark"] .netmailcomment-wrapper {
  --nf-comment-fade-rgb: 25, 27, 29; 
}

.netmailcomment-wrapper.is-collapsed .netmailcomment-body::after {
  background: linear-gradient(
    to bottom,
    rgba(var(--nf-comment-fade-rgb), 0),
    rgba(var(--nf-comment-fade-rgb), .92) 55%,
    rgba(var(--nf-comment-fade-rgb), 1) 100%
  );
}


.netmail-compose-card .card {
  border-radius: 1rem;
  overflow: hidden;
}

.netmail-compose-card .card-header {
  background: linear-gradient(180deg, rgba(0,0,0,0.018), rgba(0,0,0,0.008));
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.netmail-compose-card .card-header h5 {
  font-weight: 600;
  line-height: 1.35;
}

.netmail-compose-userbox {
  width: 72px;
}

.netmail-compose-avatar {
  width: 60px;
  height: 60px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
@media (max-width: 575.98px) {
   .netmail-compose-avatar {
  width: 40px;
  height: 40px;
   }
   .netmail-compose-userbox {
       width: 48px;
   }
}

.netmail-compose-card textarea.form-control {
  resize: none;
  height: 54px;
  min-height: 54px;
  border-radius: 0.9rem;
  padding: 0.35rem 1rem 1.2rem;
  font-size: 0.96rem;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.netmail-compose-card textarea.form-control:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.10);
}


.netmail-compose-card .btn.btn-light.border {
  border-color: rgba(0,0,0,0.08) !important;
  background: #fff;
}

.netmail-compose-card .btn.btn-light.border:hover {
  background: #f8f9fa;
}

.netmail-compose-card .dropdown-menu {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.85rem;
  z-index: 1030;
}

.netmail-compose-card .dropdown-item {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.netmail-compose-card .input-group-text {
  font-weight: 500;
}

.netmail-compose-card .form-check:last-child {
  margin-bottom: 0 !important;
}

.netmail-compose-card.is-sending {
  pointer-events: none;
  opacity: 0.96;
}

.netmail-compose-card.is-sending textarea {
  background: #f8f9fa;
}

/* Quote repost composer: one focused composer above the feed, never another feed item. */
.netmail-quote-modal .modal-dialog {
  display: flex !important;
  width: min(680px, 100%) !important;
  max-width: 680px !important;
  height: auto !important;
  max-height: calc(100vh - 2rem);
  margin: 0 !important;
}

.netmail-quote-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.netmail-quote-modal .modal-dialog.modal-dialog-centered {
  align-items: stretch;
  min-height: 0;
}

.netmail-quote-modal .modal-content {
  width: 100%;
  max-height: calc(100vh - 2rem);
  border-radius: 1rem;
  background: var(--bs-body-bg);
  box-shadow: 0 0.8rem 2.2rem rgba(0, 0, 0, 0.18);
}

.netmail-quote-modal .modal-header {
  padding: 0.9rem 1rem;
}

.netmail-quote-modal .modal-body {
  padding: 1rem;
}

.netmail-quote-modal textarea.form-control {
  min-height: 78px;
  padding: 0.5rem 1rem 1.3rem;
  resize: none;
  border-radius: 0.9rem;
  font-size: 0.96rem;
  line-height: 1.45;
}

.netmail-quote-modal textarea.form-control:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.10);
}

.netmail-quote-composer-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
}

.netmail-quote-composer-toolbar,
.netmail-quote-composer-tools,
.netmail-quote-composer-actions {
  display: flex;
  align-items: center;
}

.netmail-quote-composer-toolbar {
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.netmail-quote-composer-tools,
.netmail-quote-composer-actions {
  gap: 0.5rem;
}

.netmail-quote-composer-tools {
  flex-wrap: wrap;
  min-width: 0;
}

.netmail-quote-privacy-wrap {
  gap: 0.3rem;
}

.netmail-quote-privacy-wrap .form-select {
  width: auto;
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0.2rem;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--bs-body-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.netmail-quote-privacy-wrap .form-select:focus {
  box-shadow: none;
}

.netmail-quote-composer-source {
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 0.8rem;
  background: var(--bs-tertiary-bg);
}

/* Static media inside a repost stays non-interactive, but inherits the normal
   Netmail attachment sizing and keeps its original proportions. */
.netmail-quote-composer-source > .p-3 {
  padding: 0.875rem !important;
}

.netmail-repost-source-media {
  margin-top: 0.875rem;
}

/* Repost totals can remain visible after sharing, but are informational once
   the viewer may not share the same source again. */
.netmail-toolbar-repost-stat {
  cursor: default;
  user-select: none;
}

/* A shared-source card behaves like a single Twitter-style quote target.
   Its overlay intentionally captures clicks above static media/BBCode content,
   so the original Netmail is the only possible navigation destination. */
.netmail-repost-card {
  margin-inline: 0.5rem;
  border-color: rgba(var(--bs-primary-rgb), .18) !important;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .035);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

/* A repost is a compact preview, not a second full-sized Netmail. Keep the
   quoted source clearly subordinate to the author's own comment. */
.netmail-repost-card-content {
  padding: 0.625rem 0.75rem 0.75rem;
}

.netmail-repost-card-message {
  margin-top: 0.55rem;
  font-size: 0.94rem;
  line-height: 1.38;
}

.netmail-repost-card-message > .nf-post-content-block {
  margin: 0;
}

.netmail-repost-card-message > .nf-post-content-block + .nf-post-content-block {
  margin-top: 0.5rem;
}

/* Four visible content blocks are enough to identify the source without
   allowing multi-part posts to turn a quote card into another full feed item. */
.netmail-repost-card-message > .nf-post-content-block:nth-child(n + 5) {
  display: none;
}

.netmail-repost-card-message .nf-post-text-block,
.netmail-repost-card-message .nf-quote-body {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.netmail-repost-card-message .nf-quote {
  margin: 0 !important;
  border-radius: 0.65rem;
}

.netmail-repost-card-message .nf-quote-head {
  min-height: 1.75rem;
  padding: 0.2rem 0.5rem;
}

.netmail-repost-card-message .nf-quote-body {
  padding: 0.45rem 0.6rem 0.5rem;
  line-height: 1.38;
}

.netmail-repost-source-media .imgmediawrapper,
.netmail-repost-source-media .card {
  margin: 0.65rem auto 0;
  max-width: min(100%, 20rem) !important;
  overflow: hidden;
  border-radius: 0.75rem;
}

.netmail-repost-source-media .nf-img-preview-img,
.netmail-repost-source-media .card-img-top img {
  display: block;
  max-height: 13rem;
  object-fit: contain;
}

/* This small footer makes the preview contract explicit. It is deliberately
   not a second control: the card itself is the accessible link to the source. */
.netmail-repost-card-footer {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(var(--bs-primary-rgb), .13);
  color: var(--bs-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}

.netmail-repost-card:hover {
  border-color: rgba(var(--bs-primary-rgb), .38) !important;
  background-color: var(--bs-tertiary-bg) !important;
}

.netmail-repost-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.netmail-repost-card-link:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -3px;
}

@media (max-width: 575.98px) {
  .netmail-quote-modal.show {
    align-items: stretch;
    padding: 0;
  }

  .netmail-quote-modal .modal-dialog {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none;
  }

  .netmail-quote-modal .modal-content {
    max-height: none;
    border-radius: 0;
  }

  .netmail-quote-composer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .netmail-quote-composer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.netmail-compose-meta {
  min-height: 22px;
}

.netmail-advanced-options {
  animation: nfFadeSlideIn .18s ease;
}

.netmail-compose-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  align-items: stretch;
}

.netmail-attached-object {
  width: 100%;
}

.netmail-compose-actions,
#attachBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}

.netmail-attachment-card {
  width: auto;
  min-width: 180px;
  max-width: 360px;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.14);
  border-radius: 1rem;
  padding: 0.75rem 0.85rem;
}

.netmail-attachment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.netmail-attachment-main {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.netmail-attachment-text {
  min-width: 0;
}

.netmail-attachment-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(var(--bs-primary-rgb), 0.10);
  font-size: 0.95rem;
}

.netmail-attachment-type {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.netmail-attachment-meta {
  font-size: 0.78rem;
  line-height: 1.2;
}

.netmail-attachment-preview {
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:0;
  text-align:center;
}


.netmail-attachment-preview:empty {
  display: none;
}

.netmail-attachment-preview img.netmail-attachment-image {
  display: block;
  max-width: 120px;
  max-height: 90px;
  width: auto;
  height: auto;
  border-radius: 0.65rem;
  border: 1px solid rgba(0,0,0,0.08);
}

.netmail-attachment-preview video.netmail-attachment-video {
  display: block;
  width: 100%;
  max-width: 180px;
  max-height: 110px;
  border-radius: 0.65rem;
  background: #000;
}

.netmail-attachment-preview .netmail-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  font-size: 0.85rem;
}

.netmail-attachment-remove {
  flex: 0 0 auto;
}

.netmail-compose-card.has-attachment .media-toolbar .dropdown-toggle {
  border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
}

@keyframes nfFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .netmail-compose-footer {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .netmail-attached-object {
    width: auto;
    flex: 0 1 auto;
  }

  .netmail-compose-actions,
  #attachBtns {
    width: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-left: auto;
    justify-content: flex-end;
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .netmail-attached-object {
    width: 100%;
  }

  .netmail-attachment-card {
    width: 100%;
    max-width: none;
  }

  .netmail-compose-actions,
  #attachBtns {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 575.98px) {
  .netmail-compose-card .card-header h5 {
    font-size: 1rem;
  }

  .netmail-compose-card textarea.form-control {
    font-size: 16px;
  }

  .netmail-attachment-card {
    padding: 0.8rem;
  }

  .netmail-attachment-preview img.netmail-attachment-image {
    max-width: 100%;
  }
}

/* =========================================================
   Kommentar-Tabs wie Browser/Web-Tab-Leiste
   ========================================================= */
.netmail-comments-tabs-wrap {
  border-bottom: 1px solid var(--bs-border-color);
}

.netmail-comments-tabs {
  border-bottom: 0;
  gap: .25rem;
}

.netmail-comments-tabs .nav-item {
  margin-bottom: 0;
}

.netmail-comments-tabs .nav-link {
  border: 1px solid transparent;
  border-bottom: 0;
  border-top-left-radius: .9rem;
  border-top-right-radius: .9rem;
  padding: .5rem .9rem;
  color: var(--bs-secondary-color);
  background: transparent;
  font-size: .92rem;
  font-weight: 500;
}

.netmail-comments-tabs .nav-link:hover {
  color: var(--bs-body-color);
  background: rgba(var(--bs-secondary-rgb), .06);
  border-color: transparent;
}

.netmail-comments-tabs .nav-link.active {
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);
  font-weight: 600;
  position: relative;
  top: 1px;
}

/* =========================================================
   Kommentar-Timeline nur im Kommentarbereich
   ========================================================= */
.netmail-comments-thread {
  padding-left: .25rem;
  margin-bottom: .25rem;
}

.netmail-thread-item {
  position: relative;
}

.netmail-thread-item > .flex-shrink-0 {
  position: relative;
  z-index: 2;
}

.netmail-thread-item > .flex-shrink-0::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46px;
  bottom: -18px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--bs-secondary-bg);
  opacity: .9;
}

.netmail-thread-item:last-child > .flex-shrink-0::after {
  display: none;
}

/* Replies bekommen eine etwas dezentere Linie */
.netmail-replies-thread .netmail-thread-item > .flex-shrink-0::after {
  background: color-mix(in srgb, var(--bs-border-color) 78%, transparent);
}

/* kleines optisches Einrücken für Reply-Unterstrang */
.netmail-replies-thread {
  padding-left: .35rem;
  margin-left: .2rem !important;
  border-left: 1px solid rgba(var(--bs-secondary-rgb), .14);
}

/* optional: Kommentarinhalt leicht kompakter */
.netmail-comment-content {
  min-width: 0;
}

/* kleine Feinkorrektur für Avatare in Threads */
.netmail-comments-thread .comment-avatar img,
.netmail-replies-thread .comment-avatar img {
  position: relative;
  z-index: 2;
  background: var(--bs-body-bg);
}

/* Mobile etwas kompakter */
@media (max-width: 575.98px) {
  .netmail-comments-tabs .nav-link {
    padding: .45rem .7rem;
    font-size: .86rem;
  }

  .netmail-thread-item > .flex-shrink-0::after {
    top: 34px;
    bottom: -14px;
  }

  .netmail-replies-thread {
    margin-left: 0 !important;
    padding-left: .15rem;
  }
}

.netmail-comment-self {
  background-color: var(--bs-card-cap-bg);
  padding: 0.25rem;
  border-radius: .5rem;
  border-width: 1px;
  border-style: solid;
  border-color: var(--bs-border-color);
}

.netmail-more-menu {
  min-width: 280px;
}

.netmail-meta-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.netmail-meta-icon {
  width: 1.25rem;
  min-width: 1.25rem;
  text-align: center;
  flex: 0 0 1.25rem;
}

.netmail-more-menu .dropdown-item,
.netmail-more-menu .dropdown-item-text {
  white-space: nowrap;
}

.netmail-more-menu .dropdown-item > i {
  width: 1.25rem;
  min-width: 1.25rem;
  text-align: center;
}

.netmail-attachment {
  max-width: 720px;
  margin-top: 1rem;
}

.netmail-attachment-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bs-body-bg);
}

.netmail-attachment-caption {
  padding: .75rem 1rem;
  font-size: .92rem;
  color: var(--bs-secondary-color);
  border-top: 1px solid var(--bs-border-color);
}

.netmail-attachment-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 40vh;
  min-height: 10rem;
  overflow: hidden;
  background: rgba(var(--bs-secondary-rgb), .06);
}

.netmail-attachment-image {
  max-width: 100%;
  max-height: 40vh !important;
  width: auto;
  height: auto;
  object-fit: contain;
}

.netmail-attachment-video-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
}

.netmail-attachment-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.netmail-attachment-audio .list-group-item {
  border: 0;
  background: transparent;
}

.netmail-attachment-compact {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(var(--bs-secondary-rgb), .04);
}

/* Compact Netmail poll attachment. The full ballot is loaded only on demand. */
.nf-netmail-poll-attachment {
  max-width: 720px;
  overflow: hidden;
  border: 1px solid rgba(var(--bs-primary-rgb), .18);
  border-radius: 1rem;
  background: rgba(var(--bs-primary-rgb), .035);
}

.nf-netmail-poll-attachment-summary {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 1rem;
  padding: .9rem 1rem;
}

.nf-netmail-poll-attachment-heading {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: .7rem;
}

.nf-netmail-poll-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: rgb(var(--bs-primary-rgb));
  background: rgba(var(--bs-primary-rgb), .12);
}

.nf-netmail-poll-attachment-kicker {
  margin-bottom: .08rem;
  color: rgb(var(--bs-primary-rgb));
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nf-netmail-poll-attachment-title {
  color: var(--bs-body-color);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nf-netmail-poll-attachment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin-top: .22rem;
  color: var(--bs-secondary-color);
  font-size: .8rem;
  line-height: 1.25;
}

.nf-netmail-poll-attachment-action {
  display: inline-flex;
  align-self: flex-start;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 2.2rem;
  white-space: nowrap;
}

.nf-netmail-poll-attachment-action:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), .55);
  outline-offset: 2px;
}

.nf-netmail-poll-attachment-details {
  padding: .9rem 1rem 1rem;
  border-top: 1px solid rgba(var(--bs-primary-rgb), .14);
  background: var(--bs-body-bg);
}

.nf-netmail-poll-attachment-profile-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .75rem 1rem .9rem;
  border-top: 1px solid rgba(var(--bs-primary-rgb), .14);
  color: var(--bs-secondary-color);
  font-size: .84rem;
  line-height: 1.4;
}

.nf-netmail-poll-attachment-profile-note > i {
  margin-top: .12rem;
  color: rgb(var(--bs-primary-rgb));
}

.nf-poll-scroll-target {
  border-radius: .75rem;
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .22);
  transition: box-shadow .2s ease;
}

.nf-netmail-poll-attachment-body .nf-poll-options-form {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .nf-netmail-poll-attachment-summary {
    gap: .8rem;
  }

  .nf-netmail-poll-attachment-action {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .netmail-attachment {
    max-width: 100%;
  }

  .netmail-attachment-image-wrap {
    max-height: 20rem;
    min-height: 10rem;
  }

  .netmail-attachment-image {
    max-height: 20rem;
  }
}




.netmail-feed-shell {
  position: relative;
  padding-right: 76px;
}

.netmail-feed-shell.nf-rail-disabled {
  padding-right: 0;
}

.netmail-feed-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56px;
  pointer-events: none;
}

.netmail-action-rail-inner {
  background-color: var(--bs-tertiary-bg);
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: .75rem .25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  pointer-events: auto;
  z-index: 30;
  position: relative;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  will-change: transform, opacity;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

[data-bs-theme="dark"] .netmail-action-rail-inner {
  background-color: var(--nf-dark-surface);
}

.netmail-feed-shell.nf-rail-disabled .netmail-action-rail-inner {
  display: none;
}

.netmail-action-rail-inner::before {
  content: "";
  position: absolute;
  top: .95rem;
  bottom: .95rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: rgba(var(--bs-secondary-rgb), .22);
}

.netmail-action-rail-inner > * {
  position: relative;
  z-index: 1;
}

.netmail-rail-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--bs-secondary-rgb), .16);
  background: var(--bs-body-bg);
  box-shadow: 0 .1rem .35rem rgba(0,0,0,.04);
}

.netmail-rail-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 767.98px) {
  .netmail-feed-shell,
  .netmail-feed-shell.nf-rail-disabled {
    padding-right: 0;
  }

  .netmail-feed-rail {
    display: none;
  }
}





#netmail-timeline > .netmail-post {
  position: relative;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}


#netmail-timeline > .netmail-post .card {
  background-color: var(--bs-body-bg);
}

#netmail-timeline > .netmail-post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 3px;
  background: rgba(var(--bs-primary-rgb), .30);
}

#netmail-timeline > .netmail-post::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 8px;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 1);
}

.netmail-author-avatar{
  width:54px;
  height:54px;
  object-fit:cover;
}

@media (max-width: 575.98px){
  .netmail-author-avatar{
    width:44px;
    height:44px;
  }
}


.netmail-compose-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
}

.netmail-compose-meta-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.netmail-compose-meta-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: auto;
}

.netmail-meta-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.netmail-privacy-wrap {
  flex: 0 0 auto;
  white-space: nowrap;
}

.netmail-topic-dropdown {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.netmail-meta-label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.netmail-meta-icon {
  width: 1rem;
  text-align: center;
}

.netmail-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

.netmail-meta-chip:hover,
.netmail-meta-chip:focus {
  color: var(--bs-primary);
  text-decoration: none;
}

.netmail-meta-chip::after {
  margin-left: 0.45rem;
}

.netmail-topic-trigger {
  display: inline-flex;
  align-items: center;
  max-width: min(38vw, 280px);
  padding: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.netmail-topic-trigger:hover,
.netmail-topic-trigger:focus {
  text-decoration: none;
}

.netmail-topic-trigger #netmailCategoryText {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.netmail-meta-menu {
  min-width: 230px;
  max-width: 320px;
  border-radius: 0.85rem;
  overflow: hidden;
}

.netmail-meta-menu .dropdown-item {
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
}

.netmail-meta-menu .dropdown-item:active {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.06);
}

.netmail-topic-menu {
  min-width: 260px;
  max-width: min(92vw, 360px);
  border-radius: 0.85rem;
}

.netmail-topic-select {
  min-width: 220px;
  max-width: 100%;
}

.netmail-compose-input-wrap {
  position: relative;
}

.netmail-char-counter {
  position: absolute;
  right: 0.9rem;
  bottom: 0.2rem;
  z-index: 1;
  display: block;
  padding: 0.08rem 0.3rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .netmail-compose-meta {
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
  }

  .netmail-compose-meta-left {
    gap: 0.3rem 0.75rem;
  }

  .netmail-topic-dropdown {
    padding-left: 0;
  }

  .netmail-topic-trigger {
    max-width: min(72vw, 260px);
  }

  .netmail-topic-menu {
    min-width: min(92vw, 300px);
  }

  .netmail-topic-select {
    min-width: 100%;
  }
}




/* =========================================================
   Netmail Mobile Overflow Fix
   Betrifft: netmails + user_netmail
   Ursache: Rail/Composer/Dropdowns/nowrap auf schmalen Viewports
   ========================================================= */

@media (max-width: 767.98px) {

  .netmail-feed-shell,
  .netmail-feed-shell.nf-rail-disabled {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0 !important;
    overflow-x: clip;
  }

  .netmail-feed-rail {
    display: none !important;
  }

  #netmail-timeline,
  #netmail-timeline > .netmail-post,
  #netmail-timeline .card,
  #netmail-timeline .timeline-body,
  .netmail-compose-card,
  .netmail-compose-card .card,
  .netmail-compose-card .card-body {
    max-width: 100%;
    min-width: 0;
  }

  .netmail-compose-meta {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .netmail-compose-meta-left,
  .netmail-compose-meta-right {
    min-width: 0;
    max-width: 100%;
  }

  .netmail-compose-meta-right {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
    white-space: normal;
  }

  .netmail-privacy-wrap,
  .netmail-meta-label,
  .netmail-meta-chip {
    min-width: 0;
    max-width: 100%;
  }

  .netmail-topic-trigger {
    max-width: 100%;
  }

  .netmail-more-menu,
  .netmail-meta-menu,
  .netmail-topic-menu {
    min-width: 0 !important;
    max-width: calc(100vw - 1.5rem) !important;
  }

  .netmail-more-menu .dropdown-item,
  .netmail-more-menu .dropdown-item-text,
  .netmail-meta-menu .dropdown-item {
    white-space: normal;
  }
}





html.dark-mode .netmail-meta-chip,
body.dark-mode .netmail-meta-chip,
html.dark-mode .netmail-topic-trigger,
body.dark-mode .netmail-topic-trigger {
  color: #e9ecef;
}

html.dark-mode .netmail-meta-chip:hover,
html.dark-mode .netmail-meta-chip:focus,
html.dark-mode .netmail-topic-trigger:hover,
html.dark-mode .netmail-topic-trigger:focus,
body.dark-mode .netmail-meta-chip:hover,
body.dark-mode .netmail-meta-chip:focus,
body.dark-mode .netmail-topic-trigger:hover,
body.dark-mode .netmail-topic-trigger:focus {
  color: #8ec5ff;
}

html.dark-mode .netmail-meta-menu,
html.dark-mode .netmail-topic-menu,
body.dark-mode .netmail-meta-menu,
body.dark-mode .netmail-topic-menu {
  background: #191b1d;
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .netmail-meta-menu .dropdown-item,
body.dark-mode .netmail-meta-menu .dropdown-item {
  color: #e9ecef;
}

html.dark-mode .netmail-meta-menu .dropdown-item:hover,
html.dark-mode .netmail-meta-menu .dropdown-item:focus,
body.dark-mode .netmail-meta-menu .dropdown-item:hover,
body.dark-mode .netmail-meta-menu .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.06);
}

html.dark-mode .netmail-topic-select,
body.dark-mode .netmail-topic-select {
  background-color: #191b1d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e9ecef;
}

.nf-post-text-block {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.nf-post-text-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

/* Reine Netmail-Texte dürfen vor dem Aufklappen mehr zusammenhängenden
   Inhalt zeigen. Beiträge mit echten Anhängen behalten die kompaktere
   Standardvorschau, damit Medien nicht zu weit aus dem Feed schieben. */
.nf-netmail-body-clamp--plain .nf-post-text-clamp {
  -webkit-line-clamp: 14;
}

.netmailcomment-wrapper.is-expanded .nf-post-text-clamp,
.nf-post-body.is-expanded .nf-post-text-clamp {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* =========================================================
   Netmail Timeline Context-Aware Lines
   ========================================================= */

/* Einzelansicht: komplett ausblenden */
#netmail-timeline > .netmail-post:only-child::before,
#netmail-timeline > .netmail-post:only-child::after {
  display: none;
}
/* Einzelansicht: kein Abstand */
#netmail-timeline > .netmail-post:only-child {
  margin-top: 0;
  padding-top: 0;
}

.sidebar-hashtag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.sidebar-hashtag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), 0.06);
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sidebar-hashtag-pill:hover,
.sidebar-hashtag-pill:focus {
  background: rgba(var(--color-primary-rgb), 0.11);
  border-color: rgba(var(--color-primary-rgb), 0.32);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.sidebar-hashtag-pill span {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-hashtag-pill small {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.72rem;
  font-weight: 600;
}

.netmail-hashtag-suggest {
  position: relative;
  z-index: 20;
  margin-top: 0.25rem;
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.12));
  border-radius: 0.55rem;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.07);
}

.netmail-hashtag-suggest-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.38rem 0.6rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.25;
}

.netmail-hashtag-suggest-item:hover,
.netmail-hashtag-suggest-item.is-active {
  background: rgba(var(--color-primary-rgb), 0.075);
}

.netmail-hashtag-suggest-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--color-primary);
  font-weight: 600;
}

.netmail-hashtag-suggest-main i {
  font-size: 0.78rem;
}

.netmail-hashtag-suggest-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.netmail-hashtag-suggest-count {
  flex: 0 0 auto;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.7rem;
  font-weight: 600;
}



/* ------------------------------------------------------------
   Netmail Composer Multi-Photo Preview v4
   Preview in final gallery style
   Supports 1–12 photos

   Scope:
   - composer preview only
   - intentionally independent from global .nf-photo-grid
   - compact dimensions for the composer
------------------------------------------------------------ */

.netmail-compose-photo-grid {
  --nf-compose-photo-gutter: 4px;

  display: grid;
  width: 100%;
  max-width: 320px;

  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;

  overflow: hidden;
  border-radius: 12px;
  background: var(--bs-body-bg);
}

.netmail-compose-photo-grid-1 {
  grid-template-columns: 1fr;
}

.netmail-compose-photo-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.netmail-compose-photo-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.netmail-compose-photo-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.netmail-compose-photo-grid-5,
.netmail-compose-photo-grid-6,
.netmail-compose-photo-grid-7,
.netmail-compose-photo-grid-8,
.netmail-compose-photo-grid-9,
.netmail-compose-photo-grid-10,
.netmail-compose-photo-grid-11,
.netmail-compose-photo-grid-12 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.netmail-compose-photo-item,
.netmail-compose-photo-expand {
  position: relative;
  min-height: 88px;
  aspect-ratio: 1 / 1;
  overflow: hidden;

  box-sizing: border-box;
  border: calc(var(--nf-compose-photo-gutter) / 2) solid var(--bs-body-bg);

  background-color: var(--bs-body-bg);
  background-clip: padding-box;
}

.netmail-compose-photo-grid-1 .netmail-compose-photo-item {
  min-height: 150px;
  aspect-ratio: 16 / 10;
}

.netmail-compose-photo-grid-2 .netmail-compose-photo-item {
  min-height: 120px;
}

.netmail-compose-photo-grid-4 .netmail-compose-photo-item {
  min-height: 110px;
}

.netmail-compose-photo-grid-5 .netmail-compose-photo-item,
.netmail-compose-photo-grid-6 .netmail-compose-photo-item,
.netmail-compose-photo-grid-7 .netmail-compose-photo-item,
.netmail-compose-photo-grid-8 .netmail-compose-photo-item,
.netmail-compose-photo-grid-9 .netmail-compose-photo-item,
.netmail-compose-photo-grid-10 .netmail-compose-photo-item,
.netmail-compose-photo-grid-11 .netmail-compose-photo-item,
.netmail-compose-photo-grid-12 .netmail-compose-photo-item,
.netmail-compose-photo-grid-6 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-7 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-8 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-9 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-10 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-11 .netmail-compose-photo-expand,
.netmail-compose-photo-grid-12 .netmail-compose-photo-expand {
  min-height: 88px;
}

.netmail-compose-photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.netmail-compose-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;

  width: 28px;
  height: 28px;
  padding: 0;

  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(4px);
  box-shadow: 0 .15rem .35rem rgba(0, 0, 0, .16);
}

.netmail-compose-photo-remove:hover,
.netmail-compose-photo-remove:focus {
  background: rgba(255, 255, 255, 1);
}

.netmail-compose-photo-expand {
  display: block;
  width: 100%;
  padding: 0 !important;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  isolation: isolate;
  background: var(--bs-primary) !important;
  background-image: none !important;
  background-clip: border-box !important;
  background-origin: border-box !important;
}

.netmail-compose-photo-expand::before {
  display: none !important;
  content: none !important;
}

.netmail-compose-photo-expand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .16), transparent 35%),
    linear-gradient(135deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .86));
}

.netmail-compose-photo-expand span {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: clamp(1.35rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.netmail-compose-photo-grid.is-expanded .netmail-compose-photo-expand {
  display: none;
}

@media (max-width: 575.98px) {
  .netmail-compose-photo-grid {
    --nf-compose-photo-gutter: 3px;

    max-width: 100%;
    border-radius: 12px;
  }

  .netmail-compose-photo-grid-5,
  .netmail-compose-photo-grid-6,
  .netmail-compose-photo-grid-7,
  .netmail-compose-photo-grid-8,
  .netmail-compose-photo-grid-9,
  .netmail-compose-photo-grid-10,
  .netmail-compose-photo-grid-11,
  .netmail-compose-photo-grid-12 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .netmail-compose-photo-item,
  .netmail-compose-photo-expand {
    min-height: 76px;
  }

  .netmail-compose-photo-grid-1 .netmail-compose-photo-item {
    min-height: 130px;
  }

  .netmail-compose-photo-remove {
    width: 26px;
    height: 26px;
  }
}


/* ------------------------------------------------------------
   Netmail Photo Grid v4
   Feed gallery for official multi-photo attachments
   Supports 1–12 photos

   Scope:
   - official Netmail photo attachments only
   - intentionally independent from global .nf-photo-grid
   - same visual gutter strategy as Global Photo Grid v3

   Slot logic:
   1 image     = 1 column
   2 images    = 2 columns
   3 images    = 3 columns
   4 images    = 2x2
   5 images    = 3er grid
   6+ images   = visible slots + expand button
------------------------------------------------------------ */

.nf-netmail-photo-grid {
  --nf-netmail-photo-gutter: 4px;

  display: grid;
  width: 100%;

  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;

  margin-top: .75rem;
  margin-left: auto;
  margin-right: auto;

  overflow: hidden;
  border-radius: 14px;
  background: var(--bs-body-bg);
}

/* 1 Bild */
.nf-netmail-photo-grid-1 {
  grid-template-columns: 1fr;
  max-width: 540px;
}

/* 2 Bilder: 2 × 200px + optischer Gutter */
.nf-netmail-photo-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 404px;
}

/* 3 Bilder: kompakte 3er-Reihe */
.nf-netmail-photo-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  max-width: 500px;
}

/* 4 Bilder: echtes 2x2 */
.nf-netmail-photo-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 404px;
}

/* 5+ sichtbare Slots: 3er-Gallery */
.nf-netmail-photo-grid-5,
.nf-netmail-photo-grid-6,
.nf-netmail-photo-grid-7,
.nf-netmail-photo-grid-8,
.nf-netmail-photo-grid-9,
.nf-netmail-photo-grid-10,
.nf-netmail-photo-grid-11,
.nf-netmail-photo-grid-12,
.nf-netmail-photo-grid-many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 608px;
}

/* Einheitlicher optischer Gutter */
.nf-netmail-photo-grid-1,
.nf-netmail-photo-grid-2,
.nf-netmail-photo-grid-3,
.nf-netmail-photo-grid-4,
.nf-netmail-photo-grid-5,
.nf-netmail-photo-grid-6,
.nf-netmail-photo-grid-7,
.nf-netmail-photo-grid-8,
.nf-netmail-photo-grid-9,
.nf-netmail-photo-grid-10,
.nf-netmail-photo-grid-11,
.nf-netmail-photo-grid-12,
.nf-netmail-photo-grid-many {
  --nf-netmail-photo-gutter: 4px;
}

/* Basis-Kacheln */
.nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-expand {
  position: relative;
  display: block;

  min-height: 140px;
  aspect-ratio: 1 / 1;

  overflow: hidden;
  color: inherit;
  text-decoration: none;

  box-sizing: border-box;
  border: calc(var(--nf-netmail-photo-gutter) / 2) solid var(--bs-body-bg);

  background-color: var(--bs-body-bg);
  background-clip: padding-box;
}

/* Bilder füllen die Kachel */
.nf-netmail-photo-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform .22s ease, filter .22s ease;
}

.nf-netmail-photo-grid-item:hover img,
.nf-netmail-photo-grid-item:focus img {
  transform: scale(1.025);
  filter: brightness(.96);
}

/* Höhen */
.nf-netmail-photo-grid-1 .nf-netmail-photo-grid-item {
  min-height: 220px;
  max-height: 420px;
  aspect-ratio: auto;
}

.nf-netmail-photo-grid-2 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-3 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-4 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-5 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-6 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-7 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-8 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-9 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-10 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-11 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-12 .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-many .nf-netmail-photo-grid-item,
.nf-netmail-photo-grid-many .nf-netmail-photo-grid-expand {
  min-height: 185px;
}

.nf-netmail-photo-grid-4 .nf-netmail-photo-grid-item {
  aspect-ratio: 1 / 1;
}

/* Expand Button */
.nf-netmail-photo-grid-expand {
  width: 100%;
  padding: 0 !important;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  isolation: isolate;
  background: var(--bs-primary) !important;
  background-image: none !important;
  background-clip: border-box !important;
  background-origin: border-box !important;
}

.nf-netmail-photo-grid-expand::before {
  display: none !important;
  content: none !important;
}

.nf-netmail-photo-grid-expand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .16), transparent 35%),
    linear-gradient(135deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .86));
}

.nf-netmail-photo-grid-expand span {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.nf-netmail-photo-grid-expand:hover,
.nf-netmail-photo-grid-expand:focus {
  filter: brightness(1.08);
}

.nf-netmail-photo-grid.is-expanded .nf-netmail-photo-grid-expand {
  display: none;
}

/* Tablet/Desktop */
@media (min-width: 768px) {
  .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-expand {
    min-height: 185px;
  }

  .nf-netmail-photo-grid-1 .nf-netmail-photo-grid-item {
    min-height: 240px;
    max-height: 440px;
  }
}

/* Große Screens */
@media (min-width: 1200px) {
  .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-expand {
    min-height: 200px;
  }

  .nf-netmail-photo-grid-1 .nf-netmail-photo-grid-item {
    min-height: 260px;
    max-height: 460px;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .nf-netmail-photo-grid,
  .nf-netmail-photo-grid-1,
  .nf-netmail-photo-grid-2,
  .nf-netmail-photo-grid-3,
  .nf-netmail-photo-grid-4,
  .nf-netmail-photo-grid-5,
  .nf-netmail-photo-grid-6,
  .nf-netmail-photo-grid-7,
  .nf-netmail-photo-grid-8,
  .nf-netmail-photo-grid-9,
  .nf-netmail-photo-grid-10,
  .nf-netmail-photo-grid-11,
  .nf-netmail-photo-grid-12,
  .nf-netmail-photo-grid-many {
    --nf-netmail-photo-gutter: 3px;

    max-width: 100%;
    border-radius: 12px;
  }

  .nf-netmail-photo-grid-1 {
    grid-template-columns: 1fr;
  }

  .nf-netmail-photo-grid-2,
  .nf-netmail-photo-grid-3,
  .nf-netmail-photo-grid-4,
  .nf-netmail-photo-grid-5,
  .nf-netmail-photo-grid-6,
  .nf-netmail-photo-grid-7,
  .nf-netmail-photo-grid-8,
  .nf-netmail-photo-grid-9,
  .nf-netmail-photo-grid-10,
  .nf-netmail-photo-grid-11,
  .nf-netmail-photo-grid-12,
  .nf-netmail-photo-grid-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nf-netmail-photo-grid-1 .nf-netmail-photo-grid-item {
    min-height: 210px;
    max-height: 360px;
  }

  .nf-netmail-photo-grid-2 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-3 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-4 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-5 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-6 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-7 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-8 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-9 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-10 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-11 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-12 .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-many .nf-netmail-photo-grid-item,
  .nf-netmail-photo-grid-many .nf-netmail-photo-grid-expand {
    min-height: 130px;
  }
}


/* ------------------------------------------------------------
   Netmail Smart Block Limiter
   Blendet ganze Parser-Blöcke aus, statt Medien halb abzuschneiden
------------------------------------------------------------ */

.nf-netmail-body-clamp {
  position: relative;
}

.nf-post-content-block {
  min-width: 0;
}

.nf-post-content-block + .nf-post-content-block {
  margin-top: 0.55rem;
}

.nf-post-content-block.is-hidden-by-smart-limit {
  display: none !important;
}

.nf-netmail-body-clamp.is-smart-limited {
  position: relative;
}

.nf-netmail-body-clamp.is-smart-limited::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 0.35rem;
  background: linear-gradient(
    to right,
    rgba(var(--bs-primary-rgb), 0),
    rgba(var(--bs-primary-rgb), 0.35),
    rgba(var(--bs-primary-rgb), 0)
  );
}

.nf-netmail-body-expand-wrap {
  margin-top: 0.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
}


/* =========================================================
   Netmail Comments: Mobile safe reply toolbar
   Verhindert, dass "Absenden" auf sehr schmalen Geräten
   rechts aus dem Viewport läuft.
   ========================================================= */

.netmail-comment-content,
.commentsWrapper,
.netmail-thread-item,
.netmail-thread-item > .flex-grow-1,
#commentsWrapperDiv_,
[id^="commentsWrapperDiv_"] {
  min-width: 0;
  max-width: 100%;
}

.nf-comment-toolbar {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: clip;
}

.nf-comment-toolbar > * {
  flex-shrink: 0;
}

.nf-comment-send-btn {
  white-space: nowrap;
}

@media (max-width: 380px) {
  .nf-comment-toolbar {
    justify-content: flex-end;
  }

  .nf-comment-toolbar .nf-comment-send-btn {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (max-width: 340px) {
  .nf-comment-toolbar {
    row-gap: .5rem;
  }

  .nf-comment-toolbar .nf-comment-send-btn {
    flex-basis: 100%;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
  }
}




/* ------------------------------------------------------------
   Netmail comments: compact external video cards
------------------------------------------------------------ */

.nf-youtube-mini-card {
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-radius: 14px;
  padding: .45rem;
  margin: .5rem 0;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.nf-youtube-mini-card:hover {
  border-color: rgba(var(--bs-primary-rgb), .45);
  box-shadow: 0 .25rem .85rem rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.nf-youtube-mini-thumb {
  position: relative;
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.nf-youtube-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .86;
}

.nf-youtube-mini-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), .95);
  color: #fff;
  font-size: .85rem;
}

.nf-youtube-mini-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nf-youtube-mini-title {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nf-youtube-mini-meta {
  margin-top: .15rem;
  color: var(--bs-secondary-color);
  font-size: .8rem;
}

.nf-youtube-mini-player {
  width: 100%;
  max-width: 480px;
  margin: .5rem 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--bs-border-color);
  background: #000;
}
