/* Device Tiles Styling */
/* Global styles for device tiles components */

.device-tiles-section {
    margin-bottom: 8px;
}

.device-tiles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.device-tiles-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.device-tiles-subtitle {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 4px;
}

.refresh-devices-button {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-devices-button:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
}

.refresh-devices-button:active {
    background: rgba(59, 130, 246, 0.3);
}

.refresh-devices-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive layout adjustments */
@media (max-width: 768px) {
    .device-tiles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .refresh-devices-button {
        width: 100%;
        text-align: center;
    }
}

/* Loading state */
.device-tiles-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.device-tiles-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Error state */
.device-tiles-error {
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 6px;
    color: #fca5a5;
    font-size: 14px;
}

/* Empty state styling enhancement */
device-tiles-container .no-devices {
    background: rgba(55, 65, 81, 0.3);
    border: 1px dashed #4b5563;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    width: 100%;
}

/* Device Filter Section */
.device-filter-section {
    margin-bottom: 20px;
    padding: 0;
    transition: opacity 0.2s ease;
}

/* Hide Offline Checkbox Styling */
.hide-offline-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
    user-select: none;
}

.hide-offline-checkbox input[type="checkbox"] {
    display: none;
}

.hide-offline-checkbox .checkmark {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border: 1px solid #6b7280;
    border-radius: 3px;
    background: rgba(55, 65, 81, 0.2);
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hide-offline-checkbox:hover {
    color: #d1d5db;
}

.hide-offline-checkbox:hover .checkmark {
    border-color: #9ca3af;
    background: rgba(55, 65, 81, 0.4);
}

.hide-offline-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #6b7280;
    border-color: #6b7280;
}

.hide-offline-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
