/* ============================================================
   Nexus v1.26.3 — Video Notes + Send Later
   ============================================================ */

/* ── Video Note recorder overlay ── */
#video-note-preview {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 800;
    animation: vn-pop-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes vn-pop-in {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.vn-ring {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--accent, #4f8aff);
    box-shadow: 0 0 0 3px rgba(79,138,255,0.3), 0 8px 32px rgba(0,0,0,0.5);
}

#vn-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* зеркало для фронтальной камеры */
}

.vn-timer {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    pointer-events: none;
}

.vn-stop-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.vn-stop-btn:hover { background: rgba(220,50,50,0.8); }

/* Кнопка записи активна */
#video-note-btn.recording {
    color: var(--red, #e04444);
    animation: vn-pulse 1s ease infinite;
}
@keyframes vn-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* Показываем video-note-btn только если текст пустой и пустой input */
.input-row:has(#message-input:placeholder-shown) #video-note-btn {
    display: flex !important;
}
.input-row:has(#message-input:not(:placeholder-shown)) #video-note-btn {
    display: none !important;
}

/* ── Send Later modal ── */
.send-later-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-later-modal {
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
    border: 0.5px solid var(--border-strong);
    width: 340px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
}

.send-later-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 0.5px solid var(--border);
}

.send-later-modal .modal-body {
    padding: 16px 20px;
}

.send-later-modal .modal-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px 16px;
    justify-content: flex-end;
}

.send-later-modal input[type="datetime-local"] {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-overlay);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    margin-top: 4px;
    cursor: pointer;
}

/* TTL menu divider */
.ttl-divider {
    height: 0.5px;
    background: var(--border);
    margin: 4px 0;
}
