﻿/* wwwroot/css/remote-support.css */
/* Supporto Remoto v3: Screen Sharing + Call + Activity Log */

/* ============================================
   TOOLBAR
   ============================================ */
.rs-support-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(124,58,237,0.08) 100%);
    border-bottom: 1px solid rgba(102,126,234,0.15);
    flex-shrink: 0;
}

.rs-toolbar-section {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.rs-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border: none;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .rs-toolbar-btn i {
        font-size: 11px;
    }

    .rs-toolbar-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.rs-btn-blue {
    background: rgba(55,138,221,0.12);
    color: #185FA5;
}

    .rs-btn-blue:hover:not(:disabled) {
        background: rgba(55,138,221,0.22);
    }

.rs-btn-green {
    background: rgba(40,167,69,0.12);
    color: #1a7a34;
}

    .rs-btn-green:hover:not(:disabled) {
        background: rgba(40,167,69,0.22);
    }

.rs-btn-red {
    background: rgba(220,53,69,0.12);
    color: #a32d2d;
}

    .rs-btn-red:hover:not(:disabled) {
        background: rgba(220,53,69,0.22);
    }

/* ============================================
   SCREEN VIEWER
   ============================================ */
.rs-screen-viewer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 560px;
    height: 380px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    resize: both;
}

    .rs-screen-viewer.rs-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        resize: none !important;
    }

.rs-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255,255,255,0.06);
    color: #ddd;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.rs-viewer-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ccc;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 4px;
    transition: background 0.2s;
}

    .rs-viewer-btn:hover {
        background: rgba(255,255,255,0.2);
        color: #fff;
    }

.rs-viewer-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* ============================================
   CALL PANEL (PIP style)
   ============================================ */
.rs-call-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 260px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 10001;
}

.rs-call-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.rs-call-ctrl-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

    .rs-call-ctrl-btn:hover {
        background: rgba(255,255,255,0.3);
    }

.rs-btn-hangup {
    background: #dc3545 !important;
}

    .rs-btn-hangup:hover {
        background: #c82333 !important;
    }

/* ============================================
   ACTIVITY PANEL
   ============================================ */
.rs-activity-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 360px;
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rs-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

.rs-user-context {
    padding: 8px 14px;
    font-size: 11px;
    color: #666;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.rs-activity-log {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    max-height: 350px;
    font-family: monospace;
    font-size: 11px;
}

.rs-activity-item {
    padding: 3px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.rs-activity-time {
    color: #999;
    flex-shrink: 0;
}

.rs-activity-type {
    color: #185FA5;
    font-weight: 600;
    flex-shrink: 0;
}

.rs-activity-detail {
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   GLOBAL NOTIFICATION (incoming call/share)
   ============================================ */
.rs-global-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    animation: rsSlideDown 0.3s ease-out;
}

@keyframes rsSlideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.rs-global-notification-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 500;
    min-width: 320px;
}

.rs-notif-icon {
    font-size: 18px;
    color: #667eea;
}

.rs-notif-accept {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: #28a745;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}

    .rs-notif-accept:hover {
        background: #218838;
    }

.rs-notif-decline {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: rgba(220,53,69,0.1);
    color: #dc3545;
    font-size: 12px;
    cursor: pointer;
}

    .rs-notif-decline:hover {
        background: rgba(220,53,69,0.2);
    }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .rs-screen-viewer {
        width: calc(100vw - 20px);
        left: 10px;
        min-width: 280px;
    }

    .rs-call-panel {
        width: 260px;
        height: 240px;
    }

    .rs-activity-panel {
        width: 100vw;
        left: -100vw;
    }

    .rs-toolbar-btn span {
        display: none;
    }

    .rs-global-notification-inner {
        min-width: 280px;
        padding: 12px 14px;
        gap: 10px;
    }
}
