/* GNSS Monitor Widget Styles */

/* Widget flottant principal */
.gnss-monitor-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

/* Bouton principal du widget */
.gnss-widget-toggle {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.gnss-widget-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.gnss-widget-toggle.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Badge d'alerte */
.gnss-alert-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Menu déroulant */
.gnss-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 320px;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    border-bottom-left-radius: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    margin-bottom: -1px;
}

/* En-tête du menu */
.gnss-menu-header {
    margin-bottom: 10px;
}

.gnss-menu-header h6 {
    color: var(--bs-body-color);
    font-weight: 600;
}

/* Liste des constellations */
.gnss-constellation-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Élément de constellation */
.gnss-constellation-item {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    background-color: var(--bs-gray-100);
    transition: background-color 0.2s;
}

.gnss-constellation-item:hover {
    background-color: var(--bs-gray-200);
}

/* Indicateur de statut */
.gnss-status-indicator {
    display: flex;
    align-items: center;
}

.status-icon {
    font-size: 10px;
}

.status-text {
    font-size: 13px;
    font-weight: 500;
}

/* Barre de progression */
.gnss-progress-bar {
    margin-top: 5px;
}

.gnss-progress-bar .progress {
    background-color: var(--bs-gray-300);
}

.gnss-progress-bar .progress-bar {
    transition: width 0.6s ease;
}

/* Actions du menu */
.gnss-menu-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.gnss-menu-actions .btn {
    font-size: 13px;
    padding: 4px 12px;
}

/* Modal de détails */
.satellite-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--bs-gray-100);
    border-radius: 6px;
}

.satellite-item {
    display: flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .gnss-monitor-widget {
        bottom: 10px;
        left: 10px;
    }
    
    .gnss-dropdown-menu {
        width: 280px;
        left: -10px;
    }
    
    .gnss-widget-toggle {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .gnss-constellation-item {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .gnss-constellation-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .satellite-list {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .gnss-dropdown-menu {
        background-color: #2d3748;
        border-color: #4a5568;
    }
}

/* Animations */
.gnss-dropdown-menu {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* États de couleur pour le widget principal */
.gnss-widget-toggle[data-status="excellent"],
.gnss-widget-toggle[data-status="good"] {
    background-color: #28a745;
}

.gnss-widget-toggle[data-status="degraded"] {
    background-color: #ffc107;
}

.gnss-widget-toggle[data-status="critical"] {
    background-color: #dc3545;
}

.gnss-widget-toggle[data-status="unknown"] {
    background-color: #6c757d;
}

/* Scrollbar personnalisée */
.gnss-constellation-list::-webkit-scrollbar,
.satellite-list::-webkit-scrollbar {
    width: 6px;
}

.gnss-constellation-list::-webkit-scrollbar-track,
.satellite-list::-webkit-scrollbar-track {
    background: var(--bs-gray-200);
    border-radius: 3px;
}

.gnss-constellation-list::-webkit-scrollbar-thumb,
.satellite-list::-webkit-scrollbar-thumb {
    background: var(--bs-gray-500);
    border-radius: 3px;
}

.gnss-constellation-list::-webkit-scrollbar-thumb:hover,
.satellite-list::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-600);
}

/* Indicateur de mode */
#gnss-mode-indicator {
    font-size: 0.75rem;
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Bouton Show more/less pour les satellites */
#show-more-satellites {
    width: 100%;
    transition: all 0.3s ease;
}

#show-more-satellites:hover {
    background-color: var(--bs-secondary);
    color: white;
}

/* Animation pour la liste étendue */
#satellite-list-expanded {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}