/* ============================================================
   SHADOWSKINGS — DIRECT PLAYER MESSAGES
   ============================================================ */

.direct-message-panel {
    position: fixed;
    width: min(620px, calc(100vw - 40px));
    height: min(700px, calc(100vh - 40px));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 14, 0.97);
    border: 2px solid rgba(120, 0, 255, 0.65);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(120, 0, 255, 0.7);
    color: #e6dfff;
    z-index: 100000;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.direct-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(20, 10, 40, 0.8);
    border-bottom: 2px solid rgba(120, 0, 255, 0.5);
}

.direct-message-heading {
    font-size: 21px;
    font-weight: 700;
    color: #f3eaff;
}

.direct-message-recipient {
    margin-top: 3px;
    font-size: 14px;
    color: #bda7dd;
}

.direct-message-close {
    background: rgba(40, 20, 60, 0.7);
    border: 1px solid rgba(120, 0, 255, 0.6);
    color: #d8caff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.direct-message-close:hover {
    background: rgba(120, 0, 255, 0.8);
    color: #fff;
}

.direct-message-status {
    min-height: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: #bda7dd;
    background: rgba(20, 10, 40, 0.5);
}

.direct-message-status.error {
    color: #ff8a8a;
}

.direct-message-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: rgba(25, 12, 45, 0.65);
}

.direct-message-empty {
    text-align: center;
    margin-top: 30px;
    color: #9686aa;
}

.direct-message-row {
    display: flex;
    margin-bottom: 12px;
}

.direct-message-row.mine {
    justify-content: flex-end;
}

.direct-message-row.theirs {
    justify-content: flex-start;
}

.direct-message-bubble {
    max-width: 76%;
    padding: 10px 13px;
    border-radius: 9px;
    background: rgba(50, 28, 75, 0.9);
    border: 1px solid rgba(120, 0, 255, 0.35);
    box-shadow: 0 0 7px rgba(120, 0, 255, 0.2);
}

.direct-message-row.mine .direct-message-bubble {
    background: rgba(105, 35, 180, 0.75);
    border-color: rgba(180, 120, 255, 0.55);
}

.direct-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.direct-message-time {
    margin-top: 5px;
    text-align: right;
    font-size: 10px;
    opacity: 0.6;
}

.direct-message-compose {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 14px;
    background: rgba(20, 10, 40, 0.85);
    border-top: 2px solid rgba(120, 0, 255, 0.5);
}

.direct-message-input {
    flex: 1;
    resize: none;
    min-height: 58px;
    max-height: 130px;
    padding: 10px;
    background: rgba(30, 15, 55, 0.8);
    color: #e6dfff;
    border: 1px solid rgba(120, 0, 255, 0.55);
    border-radius: 6px;
    font: inherit;
}

.direct-message-input:focus {
    outline: none;
    border-color: rgba(180, 120, 255, 0.9);
    box-shadow: 0 0 10px rgba(180, 120, 255, 0.4);
}

.direct-message-send {
    min-width: 90px;
    padding: 12px 18px;
    background: rgba(120, 0, 255, 0.8);
    border: 1px solid rgba(180, 120, 255, 0.9);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.direct-message-send:hover:not(:disabled) {
    background: rgba(150, 40, 255, 0.9);
    box-shadow: 0 0 12px rgba(180, 120, 255, 0.8);
}

.direct-message-send:disabled {
    opacity: 0.5;
    cursor: default;
}
