/* NH Voice Notes – Mikrofon, Aufnahme-Panel und Sprachblase */

.nhvn-host {
    position: relative;
}

/* Mikrofon-Button im Schreibfeld */
.nhvn-mic {
    position: absolute;
    right: 10px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #FF1B87;
    cursor: pointer;
    opacity: .75;
    transition: background .15s ease, opacity .15s ease, transform .15s ease;
    z-index: 5;
}

.nhvn-mic:hover {
    opacity: 1;
    background: rgba(255, 27, 135, .1);
}

.nhvn-mic.is-recording {
    opacity: 1;
    background: #FF1B87;
    color: #fff;
}

/* Aufnahme-Panel */
.nhvn-panel {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 16px;
    border-radius: 999px;
    background: #141414;
    color: #fff;
    font: 500 14px/1 "DM Sans", system-ui, -apple-system, sans-serif;
    box-shadow: 0 8px 28px rgba(20, 20, 20, .28);
    z-index: 99999;
}

.nhvn-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF1B87;
    animation: nhvn-pulse 1.1s ease-in-out infinite;
}

@keyframes nhvn-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.8); }
}

.nhvn-timer {
    font-variant-numeric: tabular-nums;
    min-width: 84px;
}

.nhvn-limit {
    color: #C9C9C9;
    font-size: 12px;
}

.nhvn-panel button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font: 700 13px/1 "DM Sans", system-ui, sans-serif;
    cursor: pointer;
}

.nhvn-stop {
    background: #FF1B87;
    color: #141414;
}

.nhvn-cancel {
    background: transparent;
    color: #C9C9C9;
    border: 1px solid #3a3a3a !important;
}

/* Hinweis-Toast */
.nhvn-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    max-width: 320px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #141414;
    color: #fff;
    font: 500 13px/1.35 "DM Sans", system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(20, 20, 20, .25);
    z-index: 99999;
    transition: opacity .4s ease, transform .4s ease;
}

.nhvn-toast.is-out {
    opacity: 0;
    transform: translate(-50%, 8px);
}

/* Sprachnachricht mit Transkript */
.nhvn-note {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

.nhvn-transcript {
    display: block;
    margin: 4px 0 2px;
    padding: 8px 12px;
    border-left: 3px solid #FF9100;
    background: #FFF7EC;
    border-radius: 0 10px 10px 0;
    color: #141414;
    font: 400 14px/1.5 "DM Sans", system-ui, -apple-system, sans-serif;
}

.nhvn-transcript-label {
    display: block;
    margin-bottom: 2px;
    font: 700 11px/1.3 "DM Sans", system-ui, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5E5750;
}

.nhvn-transcript-text {
    display: block;
}

.nhvn-bubble.is-expired {
    background: #F4EDE4;
    border-style: dashed;
    padding-right: 12px;
    gap: 8px;
}

.nhvn-bubble.is-expired .nhvn-wave {
    opacity: .35;
}

/* Was im Schreibfeld steht, bevor abgeschickt wird: kleines Kästchen statt [voice:123] */
.nhvn-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 2px 4px 2px 0;
    padding: 5px 6px 5px 12px;
    border: 1px solid #F3C9DC;
    border-radius: 999px;
    background: #FFF0F6;
    color: #141414;
    font: 500 13px/1.2 "DM Sans", system-ui, -apple-system, sans-serif;
    vertical-align: middle;
    user-select: none;
}

/* Das Kürzel bleibt als Text im Feld (damit es beim Absenden mitgeht), ist aber unsichtbar. */
.nhvn-chip-marker {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.nhvn-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhvn-chip-label::before {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FF1B87 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 15a3.5 3.5 0 0 0 3.5-3.5v-5a3.5 3.5 0 1 0-7 0v5A3.5 3.5 0 0 0 12 15Zm6-3.5a1 1 0 1 0-2 0 4 4 0 0 1-8 0 1 1 0 1 0-2 0 6 6 0 0 0 5 5.9V20H8.5a1 1 0 1 0 0 2h7a1 1 0 1 0 0-2H13v-2.6a6 6 0 0 0 5-5.9Z'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}

.nhvn-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #B80062;
    font: 700 15px/1 "DM Sans", system-ui, sans-serif;
    cursor: pointer;
}

.nhvn-chip-x:hover {
    background: rgba(255, 27, 135, .14);
}

/* Sprachblase im Feed */
.nhvn-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    vertical-align: middle;
    max-width: 320px;
    margin: 4px 0;
    padding: 5px 14px 5px 5px;
    border: 1px solid #EADFD2;
    border-radius: 999px;
    background: #FFF7EC;
    color: #141414;
    font: 500 13px/1 "DM Sans", system-ui, -apple-system, sans-serif;
}

.nhvn-play {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #FF1B87;
    color: #fff;
    cursor: pointer;
}

.nhvn-play:hover {
    background: #B80062;
}

.nhvn-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 22px;
    min-width: 96px;
}

.nhvn-wave i {
    display: block;
    width: 2px;
    border-radius: 1px;
    background: #D9C9B8;
    transition: background .12s linear;
}

.nhvn-wave i.on {
    background: #FF1B87;
}

.nhvn-duration {
    font-variant-numeric: tabular-nums;
    color: #5E5750;
}

/* Handy */
@media (max-width: 520px) {
    .nhvn-panel {
        left: 12px;
        right: 12px;
        bottom: 12px;
        transform: none;
        border-radius: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nhvn-bubble {
        max-width: 100%;
    }
}
