/* Device Authorization Panel */

.pending-panel {
    position: fixed;
    top: 80px;
    right: 40px;
    width: 340px;
    max-height: 380px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.pending-panel.hidden {
    display: none;
}

.pending-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
    background: rgba(30, 30, 40, 0.95);
    border-radius: 12px 12px 0 0;
}

.pending-panel .panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ffc107;
    text-shadow: 0 1px 3px rgba(255, 193, 7, 0.3);
}

.pending-panel .close-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 18px;
    color: #ef4444;
    cursor: pointer;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pending-panel .close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.pending-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(25, 25, 35, 0.95);
}

.pending-device-item {
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.pending-device-item:hover {
    background: rgba(50, 50, 60, 0.9);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

.pending-device-item .device-info {
    flex: 1;
}

.pending-device-item .device-name {
    font-weight: 600;
    font-size: 12px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.pending-device-item .device-details {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.pending-device-item .device-model {
    background: rgba(78, 204, 163, 0.2);
    border: 1px solid rgba(78, 204, 163, 0.3);
    color: #4ecca3;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    font-size: 10px;
}

.pending-device-item .device-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.pending-device-item .device-id {
    font-family: monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.pending-device-item .device-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.pending-device-item .btn-sm {
    padding: 5px 9px;
    font-size: 11px;
    min-width: 65px;
}

.empty-state {
    text-align: center;
    padding: 25px 14px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* Badge for pending count */
.badge {
    background: #f44336;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
    min-width: 20px;
    text-align: center;
}

/* Pending devices button */


#pending-devices-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 3px 7px;
}

/* Animation for new pending devices */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pending-device-item.new {
    animation: pulse 0.5s ease-in-out;
    border-color: rgba(76, 175, 80, 0.5);
}

/* Scrollbar Styling */
.pending-list::-webkit-scrollbar {
    width: 8px;
}

.pending-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.pending-list::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.5);
    border-radius: 4px;
}

.pending-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.7);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pending-panel {
        width: calc(100vw - 80px);
        max-width: 320px;
        max-height: 350px;
        right: 40px;
        top: 70px;
    }
    
    .pending-panel .panel-header h3 {
        font-size: 12px;
    }
    
    .pending-list {
        padding: 8px;
    }
    
    .pending-device-item {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .pending-device-item .device-name {
        font-size: 11px;
    }
    
    .pending-device-item .device-details {
        font-size: 10px;
    }
    
    .pending-device-item .device-actions {
        gap: 4px;
    }
    
    .pending-device-item .btn-sm {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .pending-panel {
        width: calc(100vw - 60px);
        max-width: 280px;
        max-height: 320px;
        right: 30px;
        top: 65px;
    }
    
    .pending-device-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pending-device-item .device-actions {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    .pending-device-item .btn-sm {
        flex: 1;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .pending-panel {
        width: 360px;
        max-height: 400px;
    }
}

/* Large Desktops */
@media (min-width: 1400px) {
    .pending-panel {
        width: 380px;
        max-height: 420px;
        right: 60px;
    }
}
