/* ── Minichat floating widget ─────────────────────────────────── */

.mc-win {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #1a1a2e;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #0f3460;
    font-family: system-ui,-apple-system,sans-serif;
    font-size: 13px;
}

.mc-win.mc-hidden { display: none; }

.mc-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
    user-select: none;
}

.mc-title {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mc-title::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #48bb78;
    border-radius: 50%;
    flex-shrink: 0;
}

.mc-countdown {
    font-size: 10px;
    color: #69778f;
    min-width: 22px;
    text-align: right;
    margin-left: auto;
    margin-right: 6px;
    font-variant-numeric: tabular-nums;
}

.mc-btn-min {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: #a0aec0;
    cursor: pointer;
    font-size: 16px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 0 3px 0;
    transition: all 0.15s;
}

.mc-btn-min:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

/* ── Messages ───────────────────────────────────────────────── */

.mc-messages {
    height: 220px;
    overflow-y: auto;
    padding: 10px 12px;
    background: #16213e;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #0f3460 transparent;
}

.mc-messages::-webkit-scrollbar { width: 4px; }
.mc-messages::-webkit-scrollbar-thumb { background: #0f3460; border-radius: 4px; }

.mc-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mc-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e94560, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-transform: uppercase;
}

.mc-av-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-body { flex: 1; min-width: 0; }

.mc-who {
    font-size: 11px;
    color: #e94560;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.mc-who-name { color: #e94560; }
.mc-who-domain { color: #718096; font-weight: 400; }
.mc-who-time { color: #69778f; font-weight: 400; margin-left: auto; }

.mc-text {
    font-size: 13px;
    color: #e2e8f0;
    word-break: break-word;
    line-height: 1.4;
    background: rgba(15,52,96,0.45);
    padding: 5px 9px;
    border-radius: 0 8px 8px 8px;
    display: inline-block;
    max-width: 100%;
}

.mc-error {
    font-size: 11px;
    color: #e94560;
    text-align: center;
    padding: 4px 8px;
    opacity: 0.85;
}

/* ── Footer / input ─────────────────────────────────────────── */

.mc-footer {
    padding: 8px 10px;
    background: #1a1a2e;
    display: flex;
    gap: 6px;
    align-items: center;
    border-top: 1px solid #0f3460;
}

.mc-footer input {
    flex: 1;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 20px;
    padding: 7px 13px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.mc-footer input:focus   { border-color: #e94560; }
.mc-footer input::placeholder { color: #4a5568; }

.mc-footer button {
    background: #e94560;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.mc-footer button:hover  { background: #c53030; }
.mc-footer button:active { transform: scale(0.9); }

/* ── Bubble (minimized) ─────────────────────────────────────── */

.mc-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    /*background: linear-gradient(135deg, #e9456070, #c5303070);*/
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    border: 1px solid #ffafc7;
    /*box-shadow: 0 4px 20px rgba(233,69,96,0.5);*/
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mc-bubble.mc-visible { display: flex; }

.mc-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    background: #48bb78;
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mc-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(233,69,96,0.7);
}
