/* ChrisEmm Connect – Flüsteroberfläche 1.0.1 */

.whisper-user-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-left: 9px;
    padding: 5px 11px;
    border: 1px solid rgba(111, 128, 255, 0.38);
    border-radius: 999px;
    color: #dce2ff;
    background: rgba(102, 121, 255, 0.16);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1;
}

.whisper-user-button::before {
    content: "💬";
    margin-right: 5px;
}

.whisper-user-button:hover {
    background: rgba(103, 122, 255, 0.28);
}

.online-user > .whisper-user-button {
    margin-left: auto;
}

.whisper-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12000 !important;
    display: grid !important;
    place-items: center !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 22px !important;
}

.whisper-modal[hidden] {
    display: none !important;
}

.whisper-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(2, 8, 20, 0.84) !important;
    backdrop-filter: blur(8px);
}

.whisper-dialog {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    gap: 18px !important;
    width: min(560px, 100%) !important;
    max-height: calc(100vh - 44px) !important;
    padding: 24px !important;
    overflow: auto !important;
    border: 1px solid rgba(116, 136, 255, 0.32) !important;
    border-radius: 22px !important;
    color: var(--text, #f5f7ff) !important;
    background:
        linear-gradient(
            155deg,
            rgba(24, 39, 70, 0.99),
            rgba(9, 19, 38, 0.99)
        ) !important;
    box-shadow: 0 35px 110px rgba(0, 0, 0, 0.62) !important;
}

.whisper-dialog > header {
    display: flex !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.whisper-dialog h2 {
    margin: 5px 0 0 !important;
    color: #fff !important;
    font-size: 1.45rem !important;
}

.whisper-dialog form,
.whisper-dialog label {
    display: grid !important;
    gap: 9px !important;
}

.whisper-dialog label > span {
    color: #c4cee4 !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
}

.whisper-dialog input,
.whisper-dialog textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(139, 154, 190, 0.26) !important;
    border-radius: 13px !important;
    color: #f7f9ff !important;
    background: rgba(3, 12, 28, 0.52) !important;
    font: inherit !important;
}

.whisper-dialog textarea {
    min-height: 125px !important;
    resize: vertical !important;
}

.whisper-dialog-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 11px !important;
}

.whisper-dialog-actions .button {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 13px !important;
}

.whisper-result {
    margin: 0 !important;
    padding: 11px 13px !important;
    border-radius: 12px !important;
}

.whisper-result.success {
    color: #91f0c5 !important;
    background: rgba(67, 218, 160, 0.09) !important;
}

.whisper-result.error {
    color: #ffa3ad !important;
    background: rgba(255, 91, 109, 0.09) !important;
}

body.whisper-modal-open {
    overflow: hidden !important;
}

.whisper-center {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10500;
}

.whisper-center-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(114, 133, 255, 0.46);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(145deg, #6778ff, #5365e9);
    box-shadow: 0 14px 35px rgba(50, 71, 202, 0.35);
    cursor: pointer;
    font-weight: 850;
}

.whisper-center-count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    color: #13203b;
    background: #7be2c0;
    font-size: 0.7rem;
}

.whisper-center-panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    display: grid;
    width: min(410px, calc(100vw - 30px));
    max-height: min(620px, calc(100vh - 115px));
    overflow: hidden;
    border: 1px solid rgba(116, 136, 255, 0.3);
    border-radius: 20px;
    background:
        linear-gradient(
            155deg,
            rgba(23, 38, 69, 0.99),
            rgba(8, 18, 36, 0.99)
        );
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
}

.whisper-center-panel[hidden] {
    display: none;
}

.whisper-center-panel > header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 18px;
    border-bottom: 1px solid rgba(142, 157, 192, 0.16);
}

.whisper-center-panel h2 {
    margin: 4px 0 0;
}

.whisper-center-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    overflow-y: auto;
}

.whisper-center-empty {
    margin: 0;
    padding: 22px 15px;
    color: var(--muted, #a8b5cc);
    text-align: center;
}

.whisper-center-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 11px;
    border: 1px solid rgba(142, 157, 192, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.whisper-center-avatar {
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 12px;
}

.whisper-center-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whisper-center-message {
    min-width: 0;
}

.whisper-center-message header {
    display: flex;
    justify-content: space-between;
    gap: 9px;
}

.whisper-center-message strong {
    color: #fff;
    font-size: 0.77rem;
}

.whisper-center-message time {
    color: var(--muted, #a8b5cc);
    font-size: 0.61rem;
    white-space: nowrap;
}

.whisper-center-message p {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    color: #d8deeb;
    font-size: 0.76rem;
}

.whisper-center-reply {
    padding: 6px 9px;
    border: 1px solid rgba(111, 130, 255, 0.3);
    border-radius: 9px;
    color: #dbe1ff;
    background: rgba(111, 130, 255, 0.11);
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 800;
}

.whisper-toast {
    position: fixed;
    right: 22px;
    bottom: 82px;
    z-index: 11500;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: min(365px, calc(100vw - 30px));
    padding: 12px 13px;
    border: 1px solid rgba(120, 140, 255, 0.42);
    border-radius: 15px;
    color: #fff;
    background:
        linear-gradient(
            145deg,
            rgba(31, 48, 83, 0.99),
            rgba(11, 24, 47, 0.99)
        );
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.whisper-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.whisper-toast-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(106, 124, 255, 0.18);
}

.whisper-toast-content {
    display: grid;
    min-width: 0;
    text-align: left;
}

.whisper-toast-content strong,
.whisper-toast-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whisper-toast-content small {
    margin-top: 3px;
    color: #b9c4da;
}

.whisper-toast-arrow {
    color: #93a2c1;
    font-size: 1.45rem;
}

.chat-whisper-message {
    display: none !important;
}

@media (max-width: 620px) {
    .whisper-modal {
        align-items: end !important;
        padding: 0 !important;
    }

    .whisper-dialog {
        width: 100% !important;
        max-height: 90vh !important;
        padding: 20px 16px !important;
        border-radius: 22px 22px 0 0 !important;
    }

    .whisper-center {
        right: 12px;
        bottom: 12px;
    }

    .whisper-center-panel {
        position: fixed;
        right: 10px;
        bottom: 70px;
        left: 10px;
        width: auto;
    }

    .whisper-toast {
        right: 10px;
        bottom: 70px;
        width: calc(100vw - 20px);
    }

    .whisper-center-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .whisper-center-reply {
        grid-column: 2;
        justify-self: start;
    }
}
