/* Styles pour le panneau de connexions des trackers */

.connections-panel {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.connections-panel h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

#connections-table {
    margin-bottom: 0;
}

#connections-table th {
    background-color: var(--primary-color);
    color: white;
}

.tracker-active {
    background-color: rgba(58, 138, 61, 0.1);
}

.tracker-inactive {
    background-color: rgba(153, 0, 71, 0.1);
}

/* Styles pour les indicateurs de batterie */
.battery-indicator {
    width: 100%;
    max-width: 100px;
    height: 15px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.battery-level {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.battery-level.low {
    background-color: #dc3545;
}

.battery-level.medium {
    background-color: #ffc107;
}

.battery-level.high {
    background-color: var(--primary-color);
}

/* Styles pour les interrupteurs de visibilité */
.visibility-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.visibility-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.visibility-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 20px;
}

.visibility-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .visibility-slider {
    background-color: var(--primary-color);
}

input:focus + .visibility-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .visibility-slider:before {
    transform: translateX(20px);
}

/* Animation de chargement */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .connections-panel {
        padding: 10px 0;
    }
    
    #connections-table {
        font-size: 0.9rem;
    }
    
    .battery-indicator {
        max-width: 60px;
    }
}
